2012-01-31 23:37:51 -05:00
|
|
|
#
|
|
|
|
# Sets directory options and defines directory aliases.
|
|
|
|
#
|
|
|
|
# Authors:
|
|
|
|
# James Cox <james@imaj.es>
|
|
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
|
|
#
|
|
|
|
|
2012-08-04 14:48:32 -04:00
|
|
|
#
|
|
|
|
# Options
|
|
|
|
#
|
|
|
|
|
2012-06-02 17:17:12 -04:00
|
|
|
setopt AUTO_CD # Auto changes to a directory without typing cd.
|
2011-10-10 22:16:06 -04:00
|
|
|
setopt AUTO_PUSHD # Push the old directory onto the stack on cd.
|
2012-06-02 17:17:12 -04:00
|
|
|
setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
|
2011-10-10 22:16:06 -04:00
|
|
|
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 CDABLE_VARS # Change directory to a path stored in a variable.
|
|
|
|
setopt MULTIOS # Write to multiple descriptors.
|
|
|
|
setopt EXTENDED_GLOB # Use extended globbing syntax.
|
2012-06-02 17:17:12 -04:00
|
|
|
unsetopt CLOBBER # Do not overwrite existing files with > and >>.
|
2011-07-28 16:28:11 -04:00
|
|
|
# Use >! and >>! to bypass.
|
2009-09-22 16:39:53 +01:00
|
|
|
|
2012-08-04 14:48:32 -04:00
|
|
|
#
|
2012-01-20 20:17:12 -05:00
|
|
|
# Aliases
|
2012-08-04 14:48:32 -04:00
|
|
|
#
|
|
|
|
|
2012-04-08 18:38:46 -04:00
|
|
|
alias d='dirs -v'
|
2012-04-08 18:37:22 -04:00
|
|
|
for index ({1..9}) alias "$index"="cd +${index}"; unset index
|