Files
dotfiles/config/fish/functions/fasd_cd.fish
2018-12-05 23:42:13 -05:00

10 lines
249 B
Fish

function fasd_cd -d "fasd builtin cd"
if test (count $argv) -le 1
command fasd "$argv"
else
set -l ret (command fasd -e 'printf %s' $argv)
test -z "$ret"; and return
test -d "$ret"; and cd "$ret"; or printf "%s\n" $ret
end
end