mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-06-14 09:51:41 +00:00
put everything in lib
This commit is contained in:
6
lib/correction.zsh
Normal file
6
lib/correction.zsh
Normal file
@ -0,0 +1,6 @@
|
||||
setopt correct_all
|
||||
|
||||
alias man='nocorrect man'
|
||||
alias mv='nocorrect mv'
|
||||
alias mysql='nocorrect mysql'
|
||||
alias mv='nocorrect mv'
|
40
lib/directories.zsh
Normal file
40
lib/directories.zsh
Normal file
@ -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'
|
9
lib/misc.zsh
Normal file
9
lib/misc.zsh
Normal file
@ -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
|
21
lib/termsupport.zsh
Normal file
21
lib/termsupport.zsh
Normal file
@ -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
|
Reference in New Issue
Block a user