export EDITOR="/usr/bin/vim" export PERL5LIB="$HOME/perllib" export G_BROKEN_FILENAMES=1 HISTFILE=${HOME}/.zsh_history HISTSIZE=10000000 SAVEHIST=10000000 umask=022 ulimit -s 1024 -m 512000 -u 1024 PROMPT="[%T %/]%(!.#.$) " RPROMPT=" (%!: `locale charmap`)" precmd(){echo} setopt APPEND_HISTORY setopt CORRECT_ALL setopt HASH_LIST_ALL setopt HIST_VERIFY # directory in command position is implicit cd setopt auto_cd # don't automatically use menu completion on second TAB # setopt no_auto_menu # cd pushes old directory onto stack setopt auto_pushd # complete in cursor position setopt complete_in_word # use extended globbing patterns setopt extended_glob # write timestamps and duration of commands into history setopt extended_history # don't beep on attempt to refer non-existent history event setopt no_hist_beep # ignore all duplicates in history setopt hist_ignore_all_dups # remove from history command lines starting with space setopt hist_ignore_space # remove history commands from history setopt hist_no_store # remove superfluous blanks from history setopt hist_reduce_blanks # don't beep on ambiguous completions setopt no_list_beep # use columns with different widths to keep list smaller setopt list_packed # list jobs in long format setopt long_list_jobs # numeric filenames are sorted numerically setopt numeric_glob_sort # ignore dups in pushd setopt pushd_ignore_dups # '' inside '-quoted string means ' setopt rc_quotes # share history between shells setopt share_history #Опечатки alias cd/='cd /' alias dc='cd' alias sl='ls' alias kk='ll' #Разные alias search='apt-cache search' alias show='apt-cache show' alias 2koi='konwert any/ru-koi8r' alias dpkg='sudo dpkg' alias ll='ls -lh --color' alias rm='rm -iv' alias mv='mv -iv' alias cp='cp -iv' alias ucd='cd;umount /media/cdrom; eject -r' alias mcd='mount /media/cdrom;cd /media/cdrom' alias ..='cd ..' alias info=pinfo alias x='startx' alias mf='mount /media/flash;cd /media/flash;ll' alias uf='cd;umount /media/flash' alias mcf='mount /media/cfcard;cd /media/cfcard;ll' alias ucf='cd;umount /media/cfcard' alias h='histori' alias df='df -m' alias ss='swish-search -f /home/nik/Sites/swishdir/indexes/*.index -w' alias pkg-install='sudo aptitude install' alias pkg-remove='sudo aptitude remove' alias aptitude='sudo aptitude' alias gphoto2='sudo gphoto2' # Ниже даны опции, относящиеся к функциям zsh, # которыми собственно и определяется мощь этой оболочки # Shell functions setenv() { typeset -x "${1}${1:+=}${(@)argv[2,$#]}" } # csh compatibility freload() { while (( $# )); do; unfunction $1; autoload -U $1; shift; done } # Where to look for autoloaded function definitions fpath=($fpath ~/.zfunc) # Autoload all shell functions from all directories in $fpath (following # symlinks) that have the executable bit on (the executable bit is not # necessary, but gives you an easy way to stop the autoloading of a # particular shell function). $fpath should not be empty for this to work. for func in $^fpath/*(N-.x:t); autoload $func # Completion Styles # list of completers to use zstyle ':completion:*::::' completer _expand _complete _ignored _approximate # allow one error for every three characters typed in approximate completer #zstyle -e ':completion:*:approximate:*' max-errors # 'reply=( $(( ($#PREFIX+$#SUFFIX)/3 )) numeric )' # insert all expansions for expand completer zstyle ':completion:*:expand:*' tag-order all-expansions # formatting 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 '' # match uppercase from lowercase zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' # offer indexes before parameters in subscripts zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters # command for process lists, the local web server details and host completion #zstyle ':completion:*:processes' command 'ps -o pid,s,nice,stime,args' #zstyle ':completion:*:urls' local 'www' '/var/www/htdocs' 'public_html' zstyle '*' hosts $hosts # Filename suffixes to ignore during completion (except after rm command) zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns '*?.o' '*?.c~' '*?.old' '*?.pro' # the same for old style completion #fignore=(.o .c~ .old .pro) # ignore completion functions (until the _ignored completer) zstyle ':completion:*:functions' ignored-patterns '_*' autoload -U compinit compinit ## Установка нормального поведения клавиш Delete, Home, End и т.д.: 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 ;; *aterm*|rxvt) bindkey "^[[11~" run-help bindkey "^[[12~" undo bindkey "^[[13~" redo bindkey "^[[14~" describe-key-briefly bindkey "^[Od" backward-word bindkey "^[Oc" forward-word bindkey "^[[7~" beginning-of-line bindkey "^[[8~" end-of-line bindkey "^?" backward-delete-char bindkey "^[[3~" delete-char bindkey "^[[2~" yank bindkey "^[[5~" up-line-or-history bindkey "^[[6~" down-line-or-history 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 bindkey "^R" history-incremental-search-backward bindkey "^[h" run-help bindkey "^[[15~" spell-word ;; *xterm*) bindkey "^[[11~" run-help bindkey "^[[12~" undo bindkey "^[[13~" redo bindkey "^[[14~" describe-key-briefly bindkey "^[Od" backward-word bindkey "^[Oc" forward-word #bindkey "^X" kill-region bindkey "^[[H" beginning-of-line bindkey "^[[F" end-of-line bindkey "^?" backward-delete-char bindkey "^[[3~" delete-char bindkey "^[[2~" yank bindkey "^[[5~" up-line-or-history bindkey "^[[6~" down-line-or-history 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