fasd_cd.fish 249 B

123456789
  1. function fasd_cd -d "fasd builtin cd"
  2. if test (count $argv) -le 1
  3. command fasd "$argv"
  4. else
  5. set -l ret (command fasd -e 'printf %s' $argv)
  6. test -z "$ret"; and return
  7. test -d "$ret"; and cd "$ret"; or printf "%s\n" $ret
  8. end
  9. end