Added new directory options and removed cd aliases.
This commit is contained in:
parent
7223cd2361
commit
910b854ab4
|
@ -1,16 +1,15 @@
|
||||||
setopt auto_cd # Auto cd to a directory without typing cd.
|
setopt auto_cd # Auto cd to a directory without typing cd.
|
||||||
setopt auto_pushd # Push the old directory onto the stack on cd.
|
setopt auto_pushd # Push the old directory onto the stack on cd.
|
||||||
setopt pushd_ignore_dups # Don't store duplicates in the stack.
|
setopt pushd_ignore_dups # Don't store duplicates in the stack.
|
||||||
|
setopt pushd_silent # Do not print the directory stack after pushd or popd.
|
||||||
|
setopt pushd_to_home # Push to home directory when no argument is given.
|
||||||
|
setopt pushd_minus # Use +/-n to specify a directory in the stack.
|
||||||
setopt cdable_vars # Change directory to a path stored in a variable.
|
setopt cdable_vars # Change directory to a path stored in a variable.
|
||||||
setopt auto_name_dirs # Auto add variable-stored paths to ~ list.
|
setopt auto_name_dirs # Auto add variable-stored paths to ~ list.
|
||||||
setopt multios # Write to multiple descriptors.
|
setopt multios # Write to multiple descriptors.
|
||||||
|
setopt extended_glob # Use extended globbing syntax.
|
||||||
alias ..='cd ..'
|
unsetopt clobber # Don't overwrite existing files with > and >>.
|
||||||
alias cd..='cd ..'
|
# Use >! and >>! to bypass.
|
||||||
alias cd...='cd ../..'
|
|
||||||
alias cd....='cd ../../..'
|
|
||||||
alias cd.....='cd ../../../..'
|
|
||||||
alias cd/='cd /'
|
|
||||||
|
|
||||||
alias 1='cd -'
|
alias 1='cd -'
|
||||||
alias 2='cd +2'
|
alias 2='cd +2'
|
||||||
|
@ -22,17 +21,3 @@ alias 7='cd +7'
|
||||||
alias 8='cd +8'
|
alias 8='cd +8'
|
||||||
alias 9='cd +9'
|
alias 9='cd +9'
|
||||||
|
|
||||||
cd () {
|
|
||||||
if [[ "x$*" == "x..." ]]; then
|
|
||||||
cd ../..
|
|
||||||
elif [[ "x$*" == "x...." ]]; then
|
|
||||||
cd ../../..
|
|
||||||
elif [[ "x$*" == "x....." ]]; then
|
|
||||||
cd ../../..
|
|
||||||
elif [[ "x$*" == "x......" ]]; then
|
|
||||||
cd ../../../..
|
|
||||||
else
|
|
||||||
builtin cd "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue