commit
fdffd77e9c
@ -0,0 +1,6 @@
|
|||||||
|
setopt correct_all
|
||||||
|
|
||||||
|
alias man='nocorrect man'
|
||||||
|
alias mv='nocorrect mv'
|
||||||
|
alias mysql='nocorrect mysql'
|
||||||
|
alias mv='nocorrect mv'
|
@ -0,0 +1,40 @@
|
|||||||
|
# Changing/making/removing directory
|
||||||
|
setopt auto_name_dirs
|
||||||
|
setopt auto_pushd
|
||||||
|
setopt pushd_ignore_dups
|
||||||
|
|
||||||
|
alias ..='cd ..'
|
||||||
|
alias cd..='cd ..'
|
||||||
|
alias cd...='cd ../..'
|
||||||
|
alias cd....='cd ../../..'
|
||||||
|
alias cd.....='cd ../../../..'
|
||||||
|
alias cd/='cd /'
|
||||||
|
|
||||||
|
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'
|
||||||
|
|
||||||
|
cd () {
|
||||||
|
if [[ "x$*" == "x..." ]]; then
|
||||||
|
cd ../..
|
||||||
|
elif [[ "x$*" == "x...." ]]; then
|
||||||
|
cd ../../..
|
||||||
|
elif [[ "x$*" == "x....." ]]; then
|
||||||
|
cd ../../..
|
||||||
|
elif [[ "x$*" == "x......" ]]; then
|
||||||
|
cd ../../../..
|
||||||
|
else
|
||||||
|
builtin cd "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
alias md='mkdir -p'
|
||||||
|
alias rd=rmdir
|
||||||
|
|
||||||
|
alias d='dirs -v'
|
@ -1,15 +1,12 @@
|
|||||||
# History stuff.
|
|
||||||
setopt HIST_VERIFY
|
|
||||||
setopt INC_APPEND_HISTORY
|
|
||||||
setopt SHARE_HISTORY
|
|
||||||
setopt EXTENDED_HISTORY
|
|
||||||
setopt HIST_IGNORE_DUPS
|
|
||||||
|
|
||||||
## Command history configuration
|
## Command history configuration
|
||||||
#
|
HISTFILE=$HOME/.zsh_history
|
||||||
HISTFILE=$ZSH/log/.zsh_history
|
|
||||||
HISTSIZE=10000
|
HISTSIZE=10000
|
||||||
SAVEHIST=10000
|
SAVEHIST=10000
|
||||||
|
|
||||||
setopt hist_ignore_dups # ignore duplication command history list
|
setopt hist_ignore_dups # ignore duplication command history list
|
||||||
setopt share_history # share command history data
|
setopt share_history # share command history data
|
||||||
|
|
||||||
|
setopt hist_verify
|
||||||
|
setopt inc_append_history
|
||||||
|
setopt extended_history
|
||||||
|
setopt hist_expire_dups_first
|
||||||
|
@ -1,14 +1,41 @@
|
|||||||
# TODO: Explain what some of this does..
|
# TODO: Explain what some of this does..
|
||||||
autoload -U compinit
|
autoload -U compinit
|
||||||
compinit
|
compinit
|
||||||
|
|
||||||
|
bindkey -e
|
||||||
bindkey '\ew' kill-region
|
bindkey '\ew' kill-region
|
||||||
bindkey -s '\el' "ls\n"
|
bindkey -s '\el' "ls\n"
|
||||||
bindkey -s '\e.' "..\n"
|
bindkey -s '\e.' "..\n"
|
||||||
bindkey '^r' history-incremental-search-backward
|
bindkey '^r' history-incremental-search-backward
|
||||||
bindkey "^[[5~" up-line-or-history
|
bindkey "^[[5~" up-line-or-history
|
||||||
bindkey "^[[6~" down-line-or-history
|
bindkey "^[[6~" down-line-or-history
|
||||||
|
|
||||||
|
# make search up and down work, so partially type and hit up/down to find relevant stuff
|
||||||
|
bindkey '^[[A' up-line-or-search
|
||||||
|
bindkey '^[[B' down-line-or-search
|
||||||
|
|
||||||
bindkey "^[[H" beginning-of-line
|
bindkey "^[[H" beginning-of-line
|
||||||
bindkey "^[[1~" beginning-of-line
|
bindkey "^[[1~" beginning-of-line
|
||||||
bindkey "^[[F" end-of-line
|
bindkey "^[[F" end-of-line
|
||||||
bindkey "^[[4~" end-of-line
|
bindkey "^[[4~" end-of-line
|
||||||
bindkey ' ' magic-space # also do history expansion on space
|
bindkey ' ' magic-space # also do history expansion on space
|
||||||
|
|
||||||
|
|
||||||
|
# consider emacs keybindings:
|
||||||
|
|
||||||
|
#bindkey -e ## emacs key bindings
|
||||||
|
#
|
||||||
|
#bindkey '^[[A' up-line-or-search
|
||||||
|
#bindkey '^[[B' down-line-or-search
|
||||||
|
#bindkey '^[^[[C' emacs-forward-word
|
||||||
|
#bindkey '^[^[[D' emacs-backward-word
|
||||||
|
#
|
||||||
|
#bindkey -s '^X^Z' '%-^M'
|
||||||
|
#bindkey '^[e' expand-cmd-path
|
||||||
|
#bindkey '^[^I' reverse-menu-complete
|
||||||
|
#bindkey '^X^N' accept-and-infer-next-history
|
||||||
|
#bindkey '^W' kill-region
|
||||||
|
#bindkey '^I' complete-word
|
||||||
|
## Fix weird sequence that rxvt produces
|
||||||
|
#bindkey -s '^[[Z' '\t'
|
||||||
|
#
|
@ -0,0 +1,9 @@
|
|||||||
|
## smart urls
|
||||||
|
autoload -U url-quote-magic
|
||||||
|
zle -N self-insert url-quote-magic
|
||||||
|
|
||||||
|
## file rename magick
|
||||||
|
bindkey "^[m" copy-prev-shell-word
|
||||||
|
|
||||||
|
## jobs
|
||||||
|
setopt long_list_jobs
|
@ -0,0 +1,5 @@
|
|||||||
|
# Found on the ZshWiki
|
||||||
|
# http://zshwiki.org/home/config/prompt
|
||||||
|
#
|
||||||
|
|
||||||
|
PROMPT="%{$fg[red]%}%%%{$reset_color%} "
|
@ -0,0 +1,21 @@
|
|||||||
|
case "$TERM" in
|
||||||
|
xterm*|rxvt*)
|
||||||
|
preexec () {
|
||||||
|
print -Pn "\e]0;%n@%m: $1\a" # xterm
|
||||||
|
}
|
||||||
|
precmd () {
|
||||||
|
print -Pn "\e]0;%n@%m: %~\a" # xterm
|
||||||
|
}
|
||||||
|
;;
|
||||||
|
screen*)
|
||||||
|
preexec () {
|
||||||
|
local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]}
|
||||||
|
echo -ne "\ek$CMD\e\\"
|
||||||
|
print -Pn "\e]0;%n@%m: $1\a" # xterm
|
||||||
|
}
|
||||||
|
precmd () {
|
||||||
|
echo -ne "\ekzsh\e\\"
|
||||||
|
print -Pn "\e]0;%n@%m: %~\a" # xterm
|
||||||
|
}
|
||||||
|
;;
|
||||||
|
esac
|
Loading…
Reference in new issue