9 lines
227 B
Plaintext
9 lines
227 B
Plaintext
|
# 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
|