Browse Source

Generate the directory stack aliases with a loop.

master
Sorin Ionescu 13 years ago
parent
commit
5a19079207
  1. 14
      directory.zsh

14
directory.zsh

@ -10,13 +10,9 @@ setopt EXTENDED_GLOB # Use extended globbing syntax. @@ -10,13 +10,9 @@ setopt EXTENDED_GLOB # Use extended globbing syntax.
unsetopt CLOBBER # Don't overwrite existing files with > and >>.
# Use >! and >>! to bypass.
alias 1='cd -'
alias 2='cd +2'
alias 3='cd +3'
alias 4='cd +4'
alias 5='cd +5'
alias 6='cd +6'
alias 7='cd +7'
alias 8='cd +8'
alias 9='cd +9'
# Aliases
for index in {1..9}; do
alias "$index"="cd +${index}"
done
unset index

Loading…
Cancel
Save