1 # vim: foldmethod=marker:foldlevel=0
4 setopt APPEND_HISTORY SHARE_HISTORY INC_APPEND_HISTORY HIST_IGNORE_ALL_DUPS
5 setopt HIST_IGNORE_SPACE
6 setopt INTERACTIVE_COMMENTS
7 setopt GLOB_STAR_SHORT GLOB_DOTS EXTENDED_GLOB
9 setopt AUTO_PUSHD PUSHD_IGNORE_DUPS
18 bindkey "^[[1~" beginning-of-line
19 bindkey "^[[4~" end-of-line
22 # Command-line editing {{{
23 autoload -U edit-command-line
24 zle -N edit-command-line
25 bindkey -M vicmd v edit-command-line
29 autoload -U history-search-end
30 zle -N history-beginning-search-backward-end history-search-end
31 zle -N history-beginning-search-forward-end history-search-end
32 bindkey "^[[A" history-beginning-search-backward-end
33 bindkey "^[[B" history-beginning-search-forward-end
34 bindkey "^R" history-incremental-search-backward
38 function zle-line-init zle-keymap-select {
39 mode_vi="${${KEYMAP/vicmd/+}/(main|viins)/-}"
40 [ $timer ] && timer_show=$(( $SECONDS - $timer ))
42 prompt+="%U${timer_show}%u|"
45 prompt+="%F{magenta}%#%f "
50 zle -N zle-keymap-select
64 printf "\033]2;\033\\"
72 alias ssh="TERM=xterm ssh"
78 bindkey -s "
\eOS" " popd\n" # F4
81 # find . -name "*$1*" -print
86 ssh -C -t "$1" tmux attach -t0
88 alias sshnm='ssh -o "ControlMaster no"'
93 lynx -cookies "https://en.wikipedia.org/wiki/$1"
97 lynx -cookies "https://ru.wikipedia.org/wiki/$1"
103 alias Gb="git branch"
104 alias Gc="git checkout"
107 alias Gm="git diff --name-only --diff-filter=M"
108 alias Gam="git commit --amend"
110 git_common="--oneline --abbrev-commit"
111 alias Gl="git log $git_common --graph --decorate=short"
112 alias Gr="git --no-pager log $git_common -n 20 | perl -ne 'print \"@~\$n \$_\"; \$n++'"
113 alias Grr="git --no-pager log $git_common --graph -n 1024 | vi -c 'e ++enc=utf8' -"
114 alias Grpck="git gc --prune=now ; git repack -a -d --depth=4095 --window=10240"
116 bindkey -s "
\eOQ" " git status\n" # F2
117 bindkey -s "
\eOR" " git status --short\n" # F3
121 GREP=/usr/local/bin/grep
123 $GREP --color=always --with-filename --line-number --recursive $@ | less --RAW-CONTROL-CHARS
125 alias -g G="| $GREP --color"
137 . /usr/local/bin/virtualenvwrapper.sh
143 ~/mail/mbox"?Neue Nachrichten in =mbox"
144 ~/mail/arbeit"?Neue Nachrichten in =arbeit"
146 alias arr="mutt -f =arbeit -e 'source ~/.mutt/accounts/stcnet.ru'"
147 alias rss="mutt -f =rss"
148 bindkey -s "
\eOP" " inc\n" # F1
157 export CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"
159 export MANPATH=/usr/share/man
160 export MANPATH=$MANPATH:/usr/local/man
161 export MANPATH=$MANPATH:/usr/local/share/man
162 export MANPATH=$MANPATH:/usr/share/openssl/man
163 export MANPATH=$MANPATH:/usr/local/lib/perl5/site_perl/man
164 export MANPATH=$MANPATH:/usr/local/lib/perl5/5.26/perl/man
166 export PATH=$PATH:$HOME/git/bin
167 export MANPATH=$MANPATH:$HOME/git/share/man
169 export PATH=$PATH:$HOME/postgresql/bin
170 export MANPATH=$MANPATH:$HOME/postgresql/share/man
172 export PATH=$HOME/texlive/2017/bin/amd64-freebsd:$PATH
173 export INFOPATH=$INFOPATH:/usr/local/share/info:$HOME/texlive/2017/texmf-dist/doc/info
174 export MANPATH=$MANPATH:$HOME/texlive/2017/texmf-dist/doc/man
176 export PATH=$PATH:$HOME/stow/bin
177 export MANPATH=$MANPATH:$HOME/stow/share/man
178 export INFOPATH=$INFOPATH:$HOME/stow/share/info
180 [ -e ~/postgresql/lib/libpq.so.5 ] && export LD_PRELOAD=$HOME/postgresql/lib/libpq.so.5
184 zstyle ":completion:*:functions" ignored-patterns "_*"
185 zstyle ":completion:*" matcher-list "" 'm:{a-z\-}={A-Z\_}' 'r:|?=** m:{a-z\-}={A-Z\_}'
188 [ $CURRENT -eq 1 ] && _command_names || _files
190 zstyle ":completion:*" completer _mycomp _parameters
192 autoload -U compinit ; compinit -d /tmp/.zcompdump
194 zstyle ":completion:*:default" list-colors ""
199 ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)
200 . ~/work/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
201 typeset -A ZSH_HIGHLIGHT_STYLES
202 ZSH_HIGHLIGHT_STYLES[globbing]="fg=magenta"
203 ZSH_HIGHLIGHT_STYLES[history-expansion]="fg=magenta"
204 ZSH_HIGHLIGHT_STYLES[commandseparator]="fg=red"
205 ZSH_HIGHLIGHT_STYLES[redirection]="fg=red"
206 ZSH_HIGHLIGHT_STYLES[assign]="fg=cyan"
210 . ~/work/zsh-autosuggestions/zsh-autosuggestions.zsh
211 ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=6"