Posted by ixpict on Sat 2 May 14:57
report abuse | download | new post
- # automatically remove duplicates from these arrays
- typeset -U path cdpath fpath manpath
- # Global aliases -- These do not have to be
- # at the beginning of the command line.
- alias -g M='|more'
- alias -g H='|head'
- alias -g T='|tail'
- manpath=($X11HOME/man /usr/man /usr/lang/man /usr/local/man)
- export MANPATH
- # Hosts to use for completion (see later zstyle)
- hosts=(`hostname` 10.2.0.9 10.2.0.8 10.2.111.23 10.2.82.18)
- # Set prompts
- #autoload -U promptinit #хУФБОПЧЛБ ФЕН
- #promptinit
- # default prompt
- PROMPT="%{`echo $GREEN`%}%m%{`echo $BLUE`%}@%{`echo $RED`%}%n %{`echo $NORMAL`%}%~%# "
- # prompt for right side of screen
- RPROMPT="[%{`echo $GREEN`%}%y-%{`echo $GREEN`%}%T%{`echo $NORMAL`%}]"
- # Some environment variables
- export MAIL=/var/spool/mail/$USERNAME
- export LESS=-cex3M
- export HELPDIR=/usr/local/lib/zsh/help # directory for run-help function to find docs
- MAILCHECK=300
- DIRSTACKSIZE=20
- #HISTORY
- HISTSIZE=10000
- HISTFILE=~/.zhistory
- SAVEHIST=10000
- # Watch for my friends
- #watch=( $(<~/.friends) ) # watch for people in .friends file
- watch=(notme) # watch for everybody but me
- LOGCHECK=300 # check every 5 min for login/logout activity
- WATCHFMT='%n %a %l from %m at %t.'
- # Set/unset shell options
- setopt notify globdots correct pushdtohome cdablevars autolist
- setopt correctall autocd recexact longlistjobs
- setopt autoresume histignoredups pushdsilent noclobber
- setopt autopushd pushdminus extendedglob rcquotes mailwarning
- setopt APPEND_HISTORY
- setopt HIST_IGNORE_ALL_DUPS
- setopt HIST_IGNORE_SPACE
- setopt HIST_REDUCE_BLANKS
- unsetopt bgnice autoparamslash
- # 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
- zmodload zsh/mathfunc
- zmodload zsh/zftp
- # Some nice key bindings
- #bindkey '^X^Z' universal-argument ' ' magic-space
- #bindkey '^X^A' vi-find-prev-char-skip
- #bindkey '^Xa' _expand_alias
- #bindkey '^Z' accept-and-hold
- #bindkey -s '\M-/' \\\\
- #bindkey -s '\M-=' \|
- # bindkey -v # vi key bindings
- bindkey -e # emacs key bindings
- bindkey ' ' magic-space # also do history expansion on space
- 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
- bindkey "^[[A" up-line-or-search
- bindkey "^[[B" down-line-or-search
- bindkey " " magick-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 "^[[1~" beginning-of-line
- bindkey "^[[4~" end-of-line
- bindkey "^[e" expand-cmd-path
- bindkey "^[[A" up-line-or-search
- bindkey "^[[B" down-line-or-search
- bindkey " " magick-space
- # Setup new style completion system. To see examples of the old style (compctl
- # based) programmable completion, check Misc/compctl-examples in the zsh
- # distribution.
- autoload -U compinit
- compinit
- # 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 '_*'
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.