Skip to content

Commit

Permalink
nushell: handle queries that look like args (#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeetdsouza committed Mar 16, 2024
1 parent 5b2c922 commit 94d3cba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- fish: detect infinite loop when using `alias cd=z`.
- fish / PowerShell: handle queries that look like args (e.g. `z -x`).
- fish / Nushell / PowerShell: handle queries that look like args (e.g. `z -x`).

## [0.9.4] - 2024-02-21

Expand Down
4 changes: 2 additions & 2 deletions templates/nushell.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if (not ($env | default false __zoxide_hooked | get __zoxide_hooked)) {
#

# Jump to a directory using only keywords.
def --env __zoxide_z [...rest:string] {
def --env --wrapped __zoxide_z [...rest:string] {
let arg0 = ($rest | append '~').0
let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) {
$arg0
Expand All @@ -53,7 +53,7 @@ def --env __zoxide_z [...rest:string] {
}

# Jump to a directory using interactive search.
def --env __zoxide_zi [...rest:string] {
def --env --wrapped __zoxide_zi [...rest:string] {
cd $'(zoxide query --interactive -- ...$rest | str trim -r -c "\n")'
{%- if echo %}
echo $env.PWD
Expand Down

0 comments on commit 94d3cba

Please sign in to comment.