zoxide/functions/z.fish

14 lines
317 B
Fish
Raw Normal View History

2020-03-08 12:29:43 +00:00
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")
2020-03-08 16:15:06 +00:00
commandline -f repaint
2020-03-08 12:29:43 +00:00
case '*'
2020-03-08 18:23:00 +00:00
echo -n "$_Z_RESULT"
2020-03-08 12:29:43 +00:00
end
end
end
2020-03-08 16:15:06 +00:00