diff options
Diffstat (limited to '')
-rwxr-xr-x | home-manager/packages/scripts/deprecated/csd | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/home-manager/packages/scripts/deprecated/csd b/home-manager/packages/scripts/deprecated/csd new file mode 100755 index 00000000..33105314 --- /dev/null +++ b/home-manager/packages/scripts/deprecated/csd @@ -0,0 +1,11 @@ +#! /bin/zsh +function cd () { + if (( ${#argv} == 1 )) && [[ -f ${1} ]]; then + [[ ! -e ${1:h} ]] && return 1 + print "Correcting ${1} to ${1:h}" + builtin cd ${1:h} + else + builtin cd "$@" + fi +} + |