mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-07-31 14:17:45 +00:00
Autojump argument parsing (#1077)
I've changed the number of arguments of `def --env j [dir]` to `def --env j [...dir]`, this change makes the behaviour more like the `j` autojump you can find in other shells where an arbitrary number of inputs are given to it. ie. In zsh:  In nushell old j:  In nushell new j: 
This commit is contained in:
parent
13de3375c0
commit
e956708244
1 changed files with 2 additions and 2 deletions
|
@ -14,9 +14,9 @@ def autojump_add_to_database [dir] {
|
|||
$env.AUTOJUMP_SOURCED = 1
|
||||
autojump --add $dir
|
||||
}
|
||||
def --env j [dir] {
|
||||
def --env j [...dir] {
|
||||
$env.AUTOJUMP_SOURCED = 1
|
||||
cd (autojump $dir)
|
||||
cd (autojump ...$dir)
|
||||
}
|
||||
$env.config = ($env.config | upsert hooks.env_change.PWD {|config|
|
||||
let val = ($config | get -i hooks.env_change.PWD)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue