Brings all directory stuff to directories.zsh

- Cleans out aliases.zsh.
- Removes unneeded cd function.
This commit is contained in:
LFDM 2014-01-10 23:32:20 +01:00 committed by Marc Cornellà
parent 13e5afe805
commit 25b1cd687b
2 changed files with 15 additions and 36 deletions

View file

@ -1,11 +1,3 @@
# Push and pop directories on directory stack
alias pu='pushd'
alias po='popd'
# Basic directory operations
alias ...='cd ../..'
alias -- -='cd -'
# Super user # Super user
alias _='sudo' alias _='sudo'
alias please='sudo' alias please='sudo'
@ -25,11 +17,6 @@ then
else else
alias history='fc -l 1' alias history='fc -l 1'
fi fi
# List direcory contents
alias lsa='ls -lah'
alias l='ls -lah'
alias ll='ls -lh'
alias la='ls -lAh'
alias afind='ack-grep -il' alias afind='ack-grep -il'

View file

@ -3,12 +3,10 @@ setopt auto_pushd
setopt pushd_ignore_dups setopt pushd_ignore_dups
setopt pushdminus setopt pushdminus
alias ..='cd ..' alias -g ...='../..'
alias cd..='cd ..' alias -g ....='../../..'
alias cd...='cd ../..' alias -g .....='../../../..'
alias cd....='cd ../../..' alias -g ......='../../../../..'
alias cd.....='cd ../../../..'
alias cd/='cd /'
alias 1='cd -' alias 1='cd -'
alias 2='cd -2' alias 2='cd -2'
@ -20,23 +18,17 @@ 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 ../../../../..
elif [ -d ~/.autoenv ]; then
source ~/.autoenv/activate.sh
autoenv_cd "$@"
else
builtin cd "$@"
fi
}
alias md='mkdir -p' alias md='mkdir -p'
alias rd=rmdir alias rd=rmdir
alias d='dirs -v | head -10' alias d='dirs -v | head -10'
# List direcory contents
alias lsa='ls -lah'
alias l='ls -la'
alias ll='ls -l'
alias la='ls -lA'
alias sl=ls # often screw this up
# Push and pop directories on directory stack
alias pu='pushd'
alias po='popd'