mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2025-01-01 05:31:48 +00:00
Merge branch 'master' into v0.2.0
This commit is contained in:
commit
ba5efffd24
13
src/main.rs
13
src/main.rs
@ -189,18 +189,19 @@ function _zoxide_precmd --on-event fish_prompt
|
|||||||
end
|
end
|
||||||
|
|
||||||
function z
|
function z
|
||||||
if test (count $argv) -gt 0
|
set -l argc (count $argv)
|
||||||
|
if test $argc -eq 0
|
||||||
|
cd "$HOME" && commandline -f repaint
|
||||||
|
else if test $argc -eq 1 -a "$argv[1]" = "-"
|
||||||
|
cd "-" && commandline -f repaint
|
||||||
|
else
|
||||||
set _Z_RESULT (zoxide query $argv)
|
set _Z_RESULT (zoxide query $argv)
|
||||||
switch "$_Z_RESULT"
|
switch "$_Z_RESULT"
|
||||||
case 'query: *'
|
case 'query: *'
|
||||||
cd (string sub -s 8 -- "$_Z_RESULT")
|
cd (string sub -s 8 -- "$_Z_RESULT") && commandline -f repaint
|
||||||
commandline -f repaint
|
|
||||||
case '*'
|
case '*'
|
||||||
echo -n "$_Z_RESULT"
|
echo -n "$_Z_RESULT"
|
||||||
end
|
end
|
||||||
else
|
|
||||||
cd "$HOME"
|
|
||||||
commandline -f repaint
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
"#;
|
"#;
|
||||||
|
Loading…
Reference in New Issue
Block a user