cleans zshrc up a bit and enhances the behavior of history search
This commit is contained in:
parent
a5adb850f3
commit
f83777f7f9
1 changed files with 22 additions and 20 deletions
|
@ -1,6 +1,4 @@
|
||||||
# bindkey -v # editor jako vi
|
bindkey -e # emacs mode
|
||||||
bindkey -e # editor jako emacs
|
|
||||||
bindkey ' ' magic-space # mezerník rozbaluje odkazy na historii
|
|
||||||
|
|
||||||
alias ls="ls --classify --color --group-directories-first --quoting-style=literal"
|
alias ls="ls --classify --color --group-directories-first --quoting-style=literal"
|
||||||
alias l="ls --human-readable -l"
|
alias l="ls --human-readable -l"
|
||||||
|
@ -117,34 +115,40 @@ swap-files() {
|
||||||
mv "$1" "$TMP" && mv "$2" "$1" && mv "$TMP" "$2"
|
mv "$1" "$TMP" && mv "$2" "$1" && mv "$TMP" "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
HISTFILE=~/.history # soubor pro ukládání do historie
|
# history including search
|
||||||
SAVEHIST=5000 # ukládá se 5000 příkazů
|
HISTFILE=~/.history
|
||||||
HISTSIZE=5000 # :)
|
SAVEHIST=5000
|
||||||
|
HISTSIZE=5000
|
||||||
setopt HIST_IGNORE_SPACE
|
setopt HIST_IGNORE_SPACE
|
||||||
setopt HIST_IGNORE_ALL_DUPS
|
setopt HIST_IGNORE_ALL_DUPS
|
||||||
#setopt SHARE_HISTORY
|
|
||||||
#setopt EXTENDED_HISTORY
|
|
||||||
setopt INC_APPEND_HISTORY
|
setopt INC_APPEND_HISTORY
|
||||||
|
autoload -U up-line-or-beginning-search
|
||||||
|
autoload -U down-line-or-beginning-search
|
||||||
|
zle -N up-line-or-beginning-search
|
||||||
|
zle -N down-line-or-beginning-search
|
||||||
|
bindkey "^[[A" up-line-or-beginning-search # Up
|
||||||
|
bindkey "^[[B" down-line-or-beginning-search # Down
|
||||||
|
|
||||||
setopt EXTENDED_GLOB
|
setopt EXTENDED_GLOB
|
||||||
unsetopt NO_CLOBBER # ochrana při přesměrovávání výstupů
|
unsetopt NO_CLOBBER # prevents cat < file > file
|
||||||
unsetopt CORRECTALL # opravy překlepů
|
unsetopt CORRECTALL # hell no
|
||||||
setopt NO_BEEP # nepípat při chybách
|
setopt NO_BEEP # hell no
|
||||||
unsetopt equals # kvůli emerge =něco
|
unsetopt equals # allows me to use strings like =this without escaping
|
||||||
export ZLE_REMOVE_SUFFIX_CHARS=$' \t\n;&'
|
export ZLE_REMOVE_SUFFIX_CHARS=$' \t\n;&' # don't remove these chars after completion
|
||||||
|
|
||||||
# File completion
|
# File completion
|
||||||
setopt AUTOLIST # vypisuje možnosti pro doplnění
|
setopt AUTOLIST
|
||||||
setopt NO_LIST_AMBIGUOUS # vypisuje je HNED, ne až při druhém <Tab>
|
setopt NO_LIST_AMBIGUOUS # list files immediately
|
||||||
setopt LIST_PACKED # zkrácený výpis
|
setopt LIST_PACKED
|
||||||
zmodload -i zsh/complist # obarví vypisované soubory
|
zmodload -i zsh/complist # colors
|
||||||
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
||||||
zstyle ':completion::complete:*' use-cache 1
|
zstyle ':completion::complete:*' use-cache 1
|
||||||
zstyle ':completion:*' special-dirs true
|
zstyle ':completion:*' special-dirs true
|
||||||
autoload -U compinit # aktivuje "standardní" pravidla pro doplňování
|
autoload -U compinit
|
||||||
compinit
|
compinit
|
||||||
autoload colors zsh/terminfo
|
autoload colors zsh/terminfo
|
||||||
|
|
||||||
|
# app-shells/over-prompt
|
||||||
source /usr/share/over-prompt/zsh-init
|
source /usr/share/over-prompt/zsh-init
|
||||||
|
|
||||||
# keyboard stuff
|
# keyboard stuff
|
||||||
|
@ -162,8 +166,6 @@ bindkey "\eOH" beginning-of-line
|
||||||
bindkey "\eOF" end-of-line
|
bindkey "\eOF" end-of-line
|
||||||
bindkey "\eOd" backward-word
|
bindkey "\eOd" backward-word
|
||||||
bindkey "\eOc" forward-word
|
bindkey "\eOc" forward-word
|
||||||
bindkey '\e[A' history-beginning-search-backward
|
|
||||||
bindkey '\e[B' history-beginning-search-forward
|
|
||||||
|
|
||||||
# paludis default options
|
# paludis default options
|
||||||
export CAVE_OPTIONS="--log-level warning"
|
export CAVE_OPTIONS="--log-level warning"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue