nushell: handle queries that look like args
This commit is contained in:
parent
5b2c9222f9
commit
3369e0853a
|
|
@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- fish: detect infinite loop when using `alias cd=z`.
|
- 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
|
## [0.9.4] - 2024-02-21
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ if (not ($env | default false __zoxide_hooked | get __zoxide_hooked)) {
|
||||||
#
|
#
|
||||||
|
|
||||||
# Jump to a directory using only keywords.
|
# 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 arg0 = ($rest | append '~').0
|
||||||
let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) {
|
let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) {
|
||||||
$arg0
|
$arg0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue