1
0
Fork 0
mirror of synced 2024-11-16 13:05:35 -05:00
zimfw/modules/fasd/functions/fasd_cd
Matt Hamilton 03f15c4495 [fasd] add initial fasd support
[zlogin] zcompare fasd and all functions

[fasd] trim non-zsh options

[fasd] merge PR #75 from clvv/fasd

[fasd] partial merge PR #77 from clvv/fasd

This closes #24
2016-03-27 18:45:05 -04:00

8 lines
227 B
Text

# function to execute built-in cd
if [ $# -le 1 ]; then
fasd "$@"
else
local _fasd_ret="$(fasd -e 'printf %s' "$@")"
[ -z "$_fasd_ret" ] && return 1
[ -d "$_fasd_ret" ] && cd "$_fasd_ret" || printf %s\n "$_fasd_ret"
fi