mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-11-13 08:46:32 +00:00
16 lines
378 B
Fish
16 lines
378 B
Fish
function z
|
|
if test (count $argv) -gt 0
|
|
set _Z_RESULT (zoxide query $argv)
|
|
switch "$_Z_RESULT"
|
|
case 'query: *'
|
|
cd (string sub -s 8 -- "$_Z_RESULT")
|
|
commandline -f repaint
|
|
case '*'
|
|
if test -n "$_Z_RESULT"
|
|
echo "$_Z_RESULT"
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|