Merge branch 'master' into v0.2.0

This commit is contained in:
Ajeet D'Souza 2020-03-11 04:42:28 +05:30
commit ba5efffd24

View File

@ -189,18 +189,19 @@ function _zoxide_precmd --on-event fish_prompt
end
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)
switch "$_Z_RESULT"
case 'query: *'
cd (string sub -s 8 -- "$_Z_RESULT")
commandline -f repaint
cd (string sub -s 8 -- "$_Z_RESULT") && commandline -f repaint
case '*'
echo -n "$_Z_RESULT"
end
else
cd "$HOME"
commandline -f repaint
end
end
"#;