directories.zsh 613 Bytes
Newer Older
1
# Changing/making/removing directory
2
3
setopt auto_pushd
setopt pushd_ignore_dups
Toon Claes's avatar
Toon Claes committed
4
setopt pushdminus
5

6
7
8
9
alias -g ...='../..'
alias -g ....='../../..'
alias -g .....='../../../..'
alias -g ......='../../../../..'
10

11
alias -- -='cd -'
12
alias 1='cd -'
Toon Claes's avatar
Toon Claes committed
13
14
15
16
17
18
19
20
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'
21
22
23

alias md='mkdir -p'
alias rd=rmdir
24
25
26
27
28
29
30
31
function d () {
  if [[ -n $1 ]]; then
    dirs "$@"
  else
    dirs -v | head -10
  fi
}
compdef _dirs d
32

LFDM's avatar
LFDM committed
33
# List directory contents
34
alias lsa='ls -lah'
35
36
37
alias l='ls -lah'
alias ll='ls -lh'
alias la='ls -lAh'