zsh: update
This commit is contained in:
parent
8af457ab05
commit
aea9334649
@ -14,3 +14,18 @@ alias 1='cd -'
|
||||
for (( i=2 ; i < 10 ; i++ )) ; do
|
||||
alias $i="cd -$i"
|
||||
done ; unset i
|
||||
|
||||
## "Go to Dir" - create path if missing
|
||||
gd() {
|
||||
[ $# -lt 2 ] || echo "# gd() takes no more than one argument, seen instead: $#" >&2
|
||||
|
||||
case "$#" in
|
||||
0 ) cd ;;
|
||||
* )
|
||||
if ! [ -d "$1" ] ; then
|
||||
mkdir -p "$1" || return $?
|
||||
fi
|
||||
cd "$1"
|
||||
;;
|
||||
esac
|
||||
}
|
Loading…
Reference in New Issue
Block a user