Created
November 30, 2014 21:19
-
-
Save fangelion/e3dffb722866d4fcb944 to your computer and use it in GitHub Desktop.
zsh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My functions (don't forget to modify fpath before call compinit !!) | |
fpath=($HOME/.zsh/functions $fpath) | |
##Биндинг клавиш | |
bindkey -e | |
bindkey '^I' complete-word # complete on tab, leave expansion to _expand | |
#Исправление клавиш | |
case $TERM in | |
linux) | |
bindkey "^[[2~" yank | |
bindkey "^[[3~" delete-char | |
bindkey "^[[5~" up-line-or-history | |
bindkey "^[[6~" down-line-or-history | |
bindkey "^[[1~" beginning-of-line | |
bindkey "^[[4~" end-of-line | |
bindkey "^[e" expand-cmd-path ## C-e for expanding path of typed command | |
bindkey "^[[A" up-line-or-search ## up arrow for back-history-search | |
bindkey "^[[B" down-line-or-search ## down arrow for fwd-history-search | |
bindkey " " magic-space ## do history expansion on space | |
;; | |
*xterm*|rxvt|(dt|k|E)term) | |
bindkey "^[[2~" yank | |
bindkey "^[[3~" delete-char | |
bindkey "^[[5~" up-line-or-history | |
bindkey "^[[6~" down-line-or-history | |
bindkey "^[[7~" beginning-of-line | |
bindkey "^[[8~" end-of-line | |
bindkey "^[e" expand-cmd-path ## C-e for expanding path of typed command | |
bindkey "^[[A" up-line-or-search ## up arrow for back-history-search | |
bindkey "^[[B" down-line-or-search ## down arrow for fwd-history-search | |
bindkey " " magic-space ## do history expansion on space | |
;; | |
esac | |
autoload -U zutil | |
autoload -U compinit | |
autoload -U complist | |
#Активация | |
compinit | |
#Файлы ресурсов | |
for file in $HOME/.config/zsh/*.rc; do | |
source $file | |
done | |
###Старый rc | |
# automatically remove duplicates from these arrays | |
typeset -U path cdpath fpath manpath | |
# Autoload zsh modules when they are referenced | |
zmodload -a zsh/stat stat | |
zmodload -a zsh/zpty zpty | |
zmodload -a zsh/zprof zprof | |
zmodload -ap zsh/mapfile mapfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# case-insensitive (uppercase from lowercase) completion | |
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' | |
# process completion | |
zstyle ':completion:*:processes' command 'ps -au$USER' | |
zstyle ':completion:*:*:kill:*:processes' list-colors "=(#b) #([0-9]#)*=36=31" | |
# zstyle | |
#есть еще опция _approximate | |
zstyle ':completion:*' completer _expand _complete _ignored | |
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} | |
zstyle ':completion:*' menu select=2 | |
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s' | |
zstyle ':completion:*:descriptions' format '%U%F{yellow}%d%f%u' | |
# formacodeing and messages | |
zstyle ':completion:*' verbose yes | |
zstyle ':completion:*:descriptions' format '%B%d%b' | |
zstyle ':completion:*:messages' format '%d' | |
zstyle ':completion:*:warnings' format 'No matches for: %d' | |
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b' | |
zstyle ':completion:*' group-name ''% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setopt CORRECT | |
setopt ALWAYS_TO_END | |
setopt NOTIFY | |
## Отключение звукового сигнала при ошибках | |
setopt NOBEEP | |
setopt AUTOLIST | |
setopt AUTOCD | |
setopt PRINT_EIGHT_BIT | |
## Дополнение файла истрии | |
setopt APPEND_HISTORY | |
## Игнopupoвaть вce пoвтopeнuя команд | |
setopt HIST_IGNORE_ALL_DUPS | |
## Игнopupoвaть лишние пpoбeлы | |
setopt HIST_IGNORE_SPACE | |
## Удалять из файл истории пустые строки | |
setopt HIST_REDUCE_BLANKS | |
## Нe cчuтaть Control+C зa выxog uз oбoлoчku | |
setopt IGNORE_EOF% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for have colors | |
autoload -Uz colors | |
colors | |
autoload -Uz promptinit | |
promptinit | |
# Установка вида приглашения | |
## Обычное приглашение вида ~%=> | |
## (каталог от домашнего - пользователь/root - стрелка) | |
#PROMPT='%~%#=> ' | |
prompt elite2 green | |
## Приглашения для второй линии многострочных команд | |
## вида #_строки> | |
#PROMPT2='%i%U> ' | |
## Приглашение с правой стороны экрана вида | |
## 19:15 vc/5 (время - номер консоли) | |
#RPROMPT=' %T %y%b'% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment