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=/usr/local/man:$MANPATH
161 export MANPATH=/usr/local/share/man:$MANPATH
162 export MANPATH=/usr/share/openssl/man:$MANPATH
163 export MANPATH=/usr/local/lib/perl5/site_perl/man:$MANPATH
164 export MANPATH=/usr/local/lib/perl5/5.26/perl/man:$MANPATH
166 export PATH=$HOME/git/bin:$PATH
167 export MANPATH=$HOME/git/share/man:$MANPATH
169 # export PATH=$HOME/postgresql/bin:$PATH
170 # export MANPATH=$HOME/postgresql/share/man:$MANPATH
171 # [ -e ~/postgresql/lib/libpq.so.5 ] && export LD_PRELOAD=$HOME/postgresql/lib/libpq.so.5
173 # export PATH=$HOME/texlive/2017/bin/amd64-freebsd:$PATH
174 # export INFOPATH=/usr/local/share/info:$HOME/texlive/2017/texmf-dist/doc/info:$INFOPATH
175 # export MANPATH=$HOME/texlive/2017/texmf-dist/doc/man:$MANPATH
177 export PATH=$HOME/stow/bin:$PATH
178 export MANPATH=$HOME/stow/share/man:$MANPATH
179 export INFOPATH=$HOME/stow/share/info:$INFOPATH
183 zstyle ":completion:*:functions" ignored-patterns "_*"
184 zstyle ":completion:*" matcher-list "" 'm:{a-z\-}={A-Z\_}' 'r:|?=** m:{a-z\-}={A-Z\_}'
187 [ $CURRENT -eq 1 ] && _command_names || _files
189 zstyle ":completion:*" completer _mycomp _parameters
191 autoload -U compinit ; compinit -d /tmp/.zcompdump
193 zstyle ":completion:*:default" list-colors ""
198 ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)
199 . ~/work/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
200 typeset -A ZSH_HIGHLIGHT_STYLES
201 ZSH_HIGHLIGHT_STYLES[globbing]="fg=magenta"
202 ZSH_HIGHLIGHT_STYLES[history-expansion]="fg=magenta"
203 ZSH_HIGHLIGHT_STYLES[commandseparator]="fg=red"
204 ZSH_HIGHLIGHT_STYLES[redirection]="fg=red"
205 ZSH_HIGHLIGHT_STYLES[assign]="fg=cyan"
209 . ~/work/zsh-autosuggestions/zsh-autosuggestions.zsh
210 ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=6"