prezto_config/modules/directory/init.zsh

32 lines
1 KiB
Bash
Raw Normal View History

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