commit
3b6a695b60
34 changed files with 273 additions and 248 deletions
@ -1,35 +0,0 @@ |
||||
# Push and pop directories on directory stack |
||||
alias pu='pushd' |
||||
alias po='popd' |
||||
|
||||
# Basic directory operations |
||||
alias ...='cd ../..' |
||||
alias -- -='cd -' |
||||
|
||||
# Super user |
||||
alias _='sudo' |
||||
alias please='sudo' |
||||
|
||||
#alias g='grep -in' |
||||
|
||||
# Show history |
||||
if [ "$HIST_STAMPS" = "mm/dd/yyyy" ] |
||||
then |
||||
alias history='fc -fl 1' |
||||
elif [ "$HIST_STAMPS" = "dd.mm.yyyy" ] |
||||
then |
||||
alias history='fc -El 1' |
||||
elif [ "$HIST_STAMPS" = "yyyy-mm-dd" ] |
||||
then |
||||
alias history='fc -il 1' |
||||
else |
||||
alias history='fc -l 1' |
||||
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' |
||||
|
||||
@ -1,10 +1,37 @@ |
||||
## |
||||
# dircycle plugin: enables cycling through the directory |
||||
# stack using Ctrl+Shift+Left/Right |
||||
# enables cycling through the directory stack using |
||||
# Ctrl+Shift+Left/Right |
||||
# |
||||
# left/right direction follows the order in which directories |
||||
# were visited, like left/right arrows do in a browser |
||||
|
||||
eval "insert-cycledleft () { zle push-line; LBUFFER='pushd -q +1'; zle accept-line }" |
||||
# NO_PUSHD_MINUS syntax: |
||||
# pushd +N: start counting from left of `dirs' output |
||||
# pushd -N: start counting from right of `dirs' output |
||||
|
||||
insert-cycledleft () { |
||||
emulate -L zsh |
||||
setopt nopushdminus |
||||
|
||||
builtin pushd -q +1 &>/dev/null || true |
||||
zle reset-prompt |
||||
} |
||||
zle -N insert-cycledleft |
||||
bindkey "\e[1;6D" insert-cycledleft |
||||
eval "insert-cycledright () { zle push-line; LBUFFER='pushd -q +0'; zle accept-line }" |
||||
|
||||
insert-cycledright () { |
||||
emulate -L zsh |
||||
setopt nopushdminus |
||||
|
||||
builtin pushd -q -0 &>/dev/null || true |
||||
zle reset-prompt |
||||
} |
||||
zle -N insert-cycledright |
||||
|
||||
|
||||
# add key bindings for iTerm2 |
||||
if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then |
||||
bindkey "^[[1;6D" insert-cycledleft |
||||
bindkey "^[[1;6C" insert-cycledright |
||||
else |
||||
bindkey "\e[1;6D" insert-cycledleft |
||||
bindkey "\e[1;6C" insert-cycledright |
||||
fi |
||||
Loading…
Reference in new issue