diff --git a/.gitignore b/.gitignore index 0aacd5b..367a897 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .zcompdump* -keychain-config.zsh *.user.zsh -*.start.zsh +*.post.zsh +*.pre.zsh +*.zwc diff --git a/.zshrc b/.zshrc index cd5bfb3..d3178c1 100644 --- a/.zshrc +++ b/.zshrc @@ -1,27 +1,22 @@ -[ -e $ZDOTDIR/env.start.zsh ] && source $ZDOTDIR/env.start.zsh - -source $ZDOTDIR/env.zsh -[ -e $ZDOTDIR/env.user.zsh ] && source $ZDOTDIR/env.user.zsh - -source $ZDOTDIR/history.zsh -[ -e $ZDOTDIR/history.user.zsh ] && source $ZDOTDIR/history.user.zsh - -source $ZDOTDIR/options.zsh -[ -e $ZDOTDIR/options.user.zsh ] && source $ZDOTDIR/options.user.zsh - -source $ZDOTDIR/plugins.zsh -[ -e $ZDOTDIR/plugins.user.zsh ] && source $ZDOTDIR/plugins.user.zsh - -source $ZDOTDIR/agents.zsh -[ -e $ZDOTDIR/agents.user.zsh ] && source $ZDOTDIR/agents.user.zsh - -source $ZDOTDIR/prompt.zsh -[ -e $ZDOTDIR/prompt.user.zsh ] && source $ZDOTDIR/prompt.user.zsh - -source $ZDOTDIR/aliases.zsh -[ -e $ZDOTDIR/aliases.user.zsh ] && source $ZDOTDIR/aliases.user.zsh - -source $ZDOTDIR/compinit.zsh -[ -e $ZDOTDIR/compinit.user.zsh ] && source $ZDOTDIR/compinit.user.zsh +for S in \ + 05-start \ + 15-env \ + 25-history \ + 35-options \ + 45-plugins \ + 55-agents \ + 65-prompt \ + 75-aliases \ + 78-scripts \ + 85-compinit \ + 95-finish +do + N="${S//[0-9\-]/}" + [ -e "$ZDOTDIR/$S.pre.zsh" ] && source "$ZDOTDIR/$S.pre.zsh" + [ -e "$ZDOTDIR/$S.zsh" ] && source "$ZDOTDIR/$S.zsh" + [ -e "$ZDOTDIR/$S.user.zsh" ] && source "$ZDOTDIR/$S.user.zsh" + [ -e "$ZDOTDIR/$N.user.zsh" ] && source "$ZDOTDIR/$N.user.zsh" + [ -e "$ZDOTDIR/$S.post.zsh" ] && source "$ZDOTDIR/$S.post.zsh" +done true diff --git a/15-env.zsh b/15-env.zsh new file mode 100644 index 0000000..212c808 --- /dev/null +++ b/15-env.zsh @@ -0,0 +1,53 @@ +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_CACHE_HOME="$HOME/.cache" +export XDG_DATA_HOME="$HOME/.local/share" + +export ZSH_CACHE_DIR="$XDG_CACHE_HOME/zsh" +export ZSH_COMPDUMP="$ZSH_CACHE_DIR/completions/dump" +export ZGEN_SOURCE="$ZSH_CACHE_DIR" +export ZGEN_SOURCE_BIN="$ZSH_CACHE_DIR/plugins" +export ZGEN_DIR="$ZSH_CACHE_DIR/zgenom" + +if ps $PPID | grep mc; then + export ZSH_IS_SUBSHELL=1 +fi + +ZPFX=$ZGEN_DIR/polaris + +DISABLE_AUTO_UPDATE=true + +# PATH +for P in \ + "$HOME/.vim/plugged/vim-superman/bin" \ + "$HOME/bin" \ + "$HOME/.local/bin" +do + if [[ -d "${P}" ]]; then + export PATH="${P}:${PATH}" + fi +done + +# Удалить дубликаты в PATH +typeset -U PATH + +export GNUPGHOME="$XDG_CONFIG_HOME/gnupg" +export SVDIR="$HOME/sv" + +# Настройка uncrustify +UNCRUSTIFY_CONFIG="${XDG_CONFIG_HOME}/uncrustify/default.cfg" +[ -e "${UNCRUSTIFY_CONFIG}" ] && export UNCRUSTIFY_CONFIG + +# Настройка Intel Studio +if [ ! -z ${ENABLE_INTEL_STUDIO+x} ]; then + #export COMPILERVARS_ARCHITECTURE=intel64 + #export COMPILERVARS_PLATFORM=linux + #/opt/intel/bin/iccvars.sh + INTEL_VARS=( /opt/intel/advisor/advixe-vars.sh + /opt/intel/inspector/inspxe-vars.sh + /opt/intel/vtune_profiler/vtune-vars.sh ) + + for f in ${INTEL_VARS[*]}; do + [ -e "$f" ] && source "$f" > /dev/null + done +fi + diff --git a/history.zsh b/25-history.zsh similarity index 92% rename from history.zsh rename to 25-history.zsh index eb4bb7c..6736b04 100644 --- a/history.zsh +++ b/25-history.zsh @@ -1,9 +1,9 @@ -HISTFILE="$HOME/.cache/zsh/history" +HISTFILE="$ZSH_CACHE_DIR/history" HISTSIZE=10000000 SAVEHIST=10000000 HISTDUP=erase -[ ! -d "$HOME/.cache/zsh" ] && mkdir -p "$HOME/.cache/zsh" +[ ! -d "$ZSH_CACHE_DIR" ] && mkdir -p "$ZSH_CACHE_DIR" setopt BANG_HIST # Treat the '!' character specially during expansion. setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format. @@ -19,4 +19,3 @@ setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording en setopt HIST_VERIFY # Don't execute immediately upon history expansion. setopt HIST_BEEP # Beep when accessing nonexistent history. - diff --git a/35-options.zsh b/35-options.zsh new file mode 100644 index 0000000..133a8c9 --- /dev/null +++ b/35-options.zsh @@ -0,0 +1,19 @@ +setopt AUTO_PUSHD # Push the current directory visited on the stack. +setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack. +setopt PUSHD_SILENT # Do not print the directory stack after pushd or popd. + +autoload -Uz allopt zed zmv zcalc colors +colors + +zmodload zsh/terminfo + +autoload -Uz edit-command-line +zle -N edit-command-line +bindkey -M vicmd v edit-command-line + +autoload -Uz select-word-style +select-word-style shell + +autoload -Uz url-quote-magic +zle -N self-insert url-quote-magic + diff --git a/45-plugins.zsh b/45-plugins.zsh new file mode 100644 index 0000000..8f39c64 --- /dev/null +++ b/45-plugins.zsh @@ -0,0 +1,70 @@ +# Менеджер плагинов zgenom +if [ ! -e "$ZGEN_DIR/zgenom.zsh" ]; then + git clone https://github.com/jandamm/zgenom "$ZGEN_DIR" +fi + +source "$ZGEN_DIR/zgenom.zsh" + +# +# Ohmyzsh +# +zgenom ohmyzsh + +# Плагины +zgenom load willghatch/zsh-saneopt +zgenom load mafredri/zsh-async +zgenom load djui/alias-tips + +zgenom load rupa/z +if [[ "$DISPLAY" != '' ]] && command -v xdotool > /dev/null 2>&1 && command -v wmctrl > /dev/null 2>&1; then + zgenom load marzocchi/zsh-notify + zstyle ':notify:*' expire-time 5000 + zstyle ':notify:*' command-complete-timeout 20 + zstyle ':notify:*' enable-on-ssh yes +fi +if command -v peco > /dev/null 2>&1; then + zgenom load jimeh/zsh-peco-history +fi + +zgenom ohmyzsh plugins/autojump +zgenom ohmyzsh plugins/command-not-found +zgenom ohmyzsh plugins/common-aliases +zgenom ohmyzsh plugins/debian +zgenom ohmyzsh plugins/isodate +zgenom ohmyzsh plugins/rsync +zgenom ohmyzsh plugins/systemadmin +if command -v fzf > /dev/null 2>&1; then + export DISABLE_FZF_KEY_BINDINGS=true + zgenom ohmyzsh plugins/fzf + # fzf + [ -e /usr/share/doc/fzf/examples/key-bindings.zsh ] && source /usr/share/doc/fzf/examples/key-bindings.zsh + [ -e /usr/share/doc/fzf/examples/completion.zsh ] && source /usr/share/doc/fzf/examples/completion.zsh +fi +if command -v git > /dev/null 2>&1; then + GIT_AUTO_FETCH_INTERVAL=3600 + zgenom ohmyzsh plugins/git + zgenom ohmyzsh plugins/git-auto-fetch + zgenom ohmyzsh plugins/git-extras + zgenom ohmyzsh plugins/github + zgenom load paulirish/git-open +fi +if command -v psql > /dev/null 2>&1; then + zgenom ohmyzsh plugins/postgres +fi +if command -v sudo > /dev/null 2>&1; then + zgenom ohmyzsh plugins/sudo +fi +if command -v systemctl > /dev/null 2>&1; then + zgenom ohmyzsh plugins/systemd +fi +if command -v vim > /dev/null 2>&1; then + zgenom ohmyzsh plugins/vim-interaction +fi +zgenom ohmyzsh plugins/web-search + +zgenom ohmyzsh plugins/tmux +zstyle ':prezto:module:tmux:auto-start' local 'no' +zstyle ':prezto:module:tmux:auto-start' remote 'yes' +zstyle ':prezto:module:tmux:session' name "$(hostname)" +zgenom load laggardkernel/zsh-tmux + diff --git a/agents.zsh b/55-agents.zsh similarity index 77% rename from agents.zsh rename to 55-agents.zsh index e3fd536..8e5111c 100644 --- a/agents.zsh +++ b/55-agents.zsh @@ -6,13 +6,12 @@ # zstyle :omz:plugins:ssh-agent agent-forwarding on # zstyle :omz:plugins:ssh-agent identities id_rsa # zstyle :omz:plugins:ssh-agent lifetime 10h -# zinit snippet OMZP::ssh-agent +# zgenom ohmyzsh plugins/ssh-agent ## # GPG agent ## -# zinit ice wait'1' lucid -# zinit light laggardkernel/zsh-gpg-agent +# zgenom ohmyzsh plugins/gpg-agent ## # Keychain @@ -20,5 +19,5 @@ # zstyle :omz:plugins:keychain identities id_rsa 01234567 # zstyle :omz:plugins:keychain options --quiet --inherit local-once --noask --nocolor --quick # zstyle :omz:plugins:keychain agents gpg,ssh -# zinit snippet OMZP::keychain +# zgenom ohmyzsh plugins/keychain diff --git a/prompt.zsh b/65-prompt.zsh similarity index 91% rename from prompt.zsh rename to 65-prompt.zsh index ac2f838..2b46db3 100644 --- a/prompt.zsh +++ b/65-prompt.zsh @@ -29,7 +29,7 @@ fi autoload is-at-least if is-at-least "5.2" "$ZSH_VERSION"; then - zinit load "denysdovhan/spaceship-prompt" + zgenom load "denysdovhan/spaceship-prompt" else - zinit load "nojhan/liquidprompt" + zgenom load "nojhan/liquidprompt" fi diff --git a/aliases.zsh b/75-aliases.zsh similarity index 91% rename from aliases.zsh rename to 75-aliases.zsh index 4f07a93..a2619a4 100644 --- a/aliases.zsh +++ b/75-aliases.zsh @@ -13,7 +13,8 @@ alias aptp='sudo apt-get purge' alias aptr='sudo apt-get remove' alias aptc='sudo apt-get --purge autoremove' alias aptk='sudo apt-key add' -apts() { +alias apts='apt-cache show' +aptf() { [ -z $1 ] && return 1 if [ -z $2 ]; then apt-cache search $1 @@ -22,9 +23,6 @@ apts() { fi } -# VIM -alias gvim='gvim --remote-silent' - # Youtube YDL="$HOME/bin/youtube-dl" [ ! -x "$YDL" ] && YDL="$(which youtube-dl)" @@ -43,8 +41,6 @@ alias gur="git pull --recurse-submodules" alias gsui="git submodule update --recursive --init" alias gsur="git submodule update --recursive --init --remote" -# Фильтры -alias -g G="| grep" -alias -g L="| less" +# Фильтры (H,T,G,L определены в common-aliases) alias -g NN='&>/dev/null' diff --git a/78-scripts.zsh b/78-scripts.zsh new file mode 100644 index 0000000..7826074 --- /dev/null +++ b/78-scripts.zsh @@ -0,0 +1,57 @@ +ch() { + curl -s "https://cheat.sh/$1" | less +} + +exf() { + case "$1" in + *.tar.bz2) tar xjf "$1" ;; + *.tar.gz) tar xzf "$1" ;; + *.tar.xz) tar xJf "$1" ;; + *.tbz2) tar xjf "$1" ;; + *.tgz) tar xzf "$1" ;; + *.tar) tar xf "$1" ;; + *.zip) unzip "$1" ;; + *.7z) 7z x "$1" ;; + *.iso) 7z x "$1" ;; + *.rar) unrar x "$1" ;; + *) echo "'$1' cannot be extracted" ;; + esac +} + +exfl() { + for F in "$@" + do + if [ -f "$F" ]; then + exf "$F" + else + echo "'$F' is not a valid file" + fi + done +} + +exd() { + case "$1" in + *.tar.bz2) b=${1%.tar.bz2}; mkdir -p "$b">/dev/null; tar xjf "$1" -C "$b" ;; + *.tar.gz) b=${1%.tar.gz}; mkdir -p "$b">/dev/null; tar xzf "$1" -C "$b" ;; + *.tar.xz) b=${1%.tar.xz}; mkdir -p "$b">/dev/null; tar xJf "$1" -C "$b" ;; + *.tbz2) b=${1%.tbz2}; mkdir -p "$b">/dev/null; tar xjf "$1" -C "$b" ;; + *.tgz) b=${1%.tgz}; mkdir -p "$b">/dev/null; tar xzf "$1" -C "$b" ;; + *.tar) b=${1%.tar}; mkdir -p "$b">/dev/null; tar xf "$1" -C "$b" ;; + *.zip) b=${1%.zip}; unzip "$1" -d "$b" ;; + *.7z) b=${1%.7z}; 7z x -o"$b" "$1" ;; + *.iso) b=${1%.iso}; 7z x -o"$b" "$1" ;; + *.rar) b=${1%.rar}; rar x "$1" "$b" ;; + *) echo "'$1' cannot be extracted" ;; + esac +} + +exdl() { + for F in "$@" + do + if [ -f "$F" ]; then + exd "$F" + else + echo "'$F' is not a valid file" + fi + done +} diff --git a/85-compinit.zsh b/85-compinit.zsh new file mode 100644 index 0000000..d3d2d07 --- /dev/null +++ b/85-compinit.zsh @@ -0,0 +1,44 @@ +if [ -z "${ZSH_IS_SUBSHELL}" ]; then + typeset -i _compinit_updated_at=$(date +'%j' -r $ZSH_COMPDUMP 2>/dev/null || stat -f '%Sm' -t '%j' $ZSH_COMPDUMP 2>/dev/null) + ZGEN_COMPINIT_FLAGS="-i" + if [ $(date +'%j') = $_compinit_updated_at ]; then + ZGEN_COMPINIT_FLAGS+=" -C" + fi + unset _compinit_updated_at + + zmodload -i zsh/complist + autoload -Uz compinit && eval "compinit $ZGEN_COMPINIT_FLAGS -d $ZSH_COMPDUMP" + + #zgenom load marlonrichert/zsh-autocomplete + zgenom load zsh-users/zsh-autosuggestions +fi + +# Speed up autocomplete, force prefix mapping +zstyle ':completion:*' accept-exact '*(N)' +zstyle ':completion:*' use-cache on +zstyle ':completion:*' cache-path $ZSH_CACHE_DIR/completion + +zstyle ':completion:*:processes' command 'ps -ax' +zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;32' +zstyle ':completion:*:*:kill:*' menu yes select +zstyle ':completion:*:*:kill:*' force-list always +zstyle ':completion:*:*:kill:*' insert-ids single + +zstyle ':completion:*:processes-names' command 'ps -e -o comm=' +zstyle ':completion:*:*:killall:*' menu yes select +zstyle ':completion:*:killall:*' force-list always + +# SSH/SCP/RSYNC +zstyle ':completion:*:(ssh|scp|rsync):*' hosts off +zstyle ':completion:*:(scp|rsync):*' tag-order 'hosts:-host hosts:-domain:domain hosts:-ipaddr:ip\ address *' +zstyle ':completion:*:(scp|rsync):*' group-order users files all-files hosts-domain hosts-host hosts-ipaddr +zstyle ':completion:*:ssh:*' tag-order users 'hosts:-host hosts:-domain:domain hosts:-ipaddr:ip\ address *' +zstyle ':completion:*:ssh:*' group-order hosts-domain hosts-host users hosts-ipaddr +zstyle ':completion:*:(ssh|scp|rsync):*:hosts-host' ignored-patterns '*.*' loopback localhost +zstyle ':completion:*:(ssh|scp|rsync):*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^*.*' '*@*' +zstyle ':completion:*:(ssh|scp|rsync):*:hosts-ipaddr' ignored-patterns '^<->.<->.<->.<->' '127.0.0.<->' + +# Вызов в этом месте и в таком порядке +zgenom load zsh-users/zsh-syntax-highlighting +zgenom load zsh-users/zsh-history-substring-search + diff --git a/95-finish.zsh b/95-finish.zsh new file mode 100644 index 0000000..6e9d3b6 --- /dev/null +++ b/95-finish.zsh @@ -0,0 +1,3 @@ +#zgenom save 2>/dev/null +#zgenom compile $ZDOTDIR + diff --git a/README.md b/README.md index 448c3d8..d97cba2 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ sudo ${EDITOR:-mcedit} /etc/zsh/zshenv и добавить строку ```sh -export ZDOTDIR=$HOME/.config/zsh +[[ -z "$ZDOTDIR" ]] && export ZDOTDIR=$HOME/.config/zsh ``` Установить интерпретатор Zsh по умолчанию для пользователя `username`. @@ -45,16 +45,15 @@ sudo usermod -s /usr/bin/zsh username Для любого из вариантов следует скопировать шаблонный файл для настроек: ```sh -cp ~/.config/zsh/agents.zsh ~/.config/zsh/agents.user.zsh +cp ~/.config/zsh/55-agents.zsh ~/.config/zsh/55-agents.user.zsh ``` ## Настройка GPG агента -Раскомментировать в файле ` ~/.config/zsh/agents.user.zsh` строки: +Раскомментировать в файле ` ~/.config/zsh/55-agents.user.zsh` строки: ```text -# zinit ice wait'1' lucid -# zinit light laggardkernel/zsh-gpg-agent +# zgenom ohmyzsh plugins/gpg-agent ``` Пример файла настройки GPG агента `~/.config/gnupg/gpg-agent.conf`: @@ -75,13 +74,13 @@ pinentry-program /usr/bin/pinentry-qt ## Настройка SSH агента -Раскомментировать в файле ` ~/.config/zsh/agents.user.zsh` строки: +Раскомментировать в файле ` ~/.config/zsh/55-agents.user.zsh` строки: ```text # zstyle :omz:plugins:ssh-agent agent-forwarding on # zstyle :omz:plugins:ssh-agent identities id_rsa # zstyle :omz:plugins:ssh-agent lifetime 10h -# zinit snippet OMZP::ssh-agent +# zgenom ohmyzsh plugins/ssh-agent ``` Добавить в конец файла `~/.ssh/config` правило для разрешения агенту сохранять ключи: @@ -99,13 +98,13 @@ Host * Для её работы необходимо отключить в системе все автоматические запуски агентов, например в файле `/etc/X11/Xsession.options`. -Раскомментировать в файле ` ~/.config/zsh/agents.user.zsh` строки: +Раскомментировать в файле ` ~/.config/zsh/55-agents.user.zsh` строки: ```text # zstyle :omz:plugins:keychain identities id_rsa 01234567 # zstyle :omz:plugins:keychain options --quiet --inherit local-once --noask --nocolor --quick # zstyle :omz:plugins:keychain agents gpg,ssh -# zinit snippet OMZP::keychain +# zgenom ohmyzsh plugins/keychain ``` Отредактировать файлы настроек для агента GPG и SSH, как это описано в разделах выше. @@ -114,7 +113,7 @@ Host * ## Инициализация После редактирования файлов настройки запустить `zsh`, в результате чего будет -загружен менеджер пакетов `zinit` и необходимые плагины. +загружен менеджер пакетов [`zgenom`](https://github.com/jandamm/zgenom/) и необходимые плагины. ## Обновление @@ -122,11 +121,11 @@ Host * Обновление менеджера пакетов: ```sh -zinit self-update +zgenom selfupdate ```` Обновление плагинов: ```sh -zinit update --parallel +zgenom update ``` diff --git a/compinit.zsh b/compinit.zsh deleted file mode 100644 index 39e38fc..0000000 --- a/compinit.zsh +++ /dev/null @@ -1,27 +0,0 @@ -typeset -i _compinit_updated_at=$(date +'%j' -r $ZINIT[ZCOMPDUMP_PATH] 2>/dev/null || stat -f '%Sm' -t '%j' $ZINIT[ZCOMPDUMP_PATH] 2>/dev/null) -if [ $(date +'%j') != $_compinit_updated_at ]; then - ZINIT[COMPINIT_OPTS]="-i" -else - ZINIT[COMPINIT_OPTS]="-C -i" -fi -unset _compinit_updated_at - -zinit wait lucid for \ - atinit"zpcompinit; zpcdreplay" \ - zdharma/fast-syntax-highlighting \ - atload"!_zsh_autosuggest_start" \ - zsh-users/zsh-autosuggestions \ - blockf \ - zsh-users/zsh-completions - -zmodload -i zsh/complist - -zstyle ':completion:*:processes' command 'ps -ax' -zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;32' -zstyle ':completion:*:*:kill:*' menu yes select -zstyle ':completion:*:kill:*' force-list always - -zstyle ':completion:*:processes-names' command 'ps -e -o comm=' -zstyle ':completion:*:*:killall:*' menu yes select -zstyle ':completion:*:killall:*' force-list always - diff --git a/env.zsh b/env.zsh deleted file mode 100644 index 0cdfa9a..0000000 --- a/env.zsh +++ /dev/null @@ -1,37 +0,0 @@ -export XDG_CONFIG_HOME=$HOME/.config -export XDG_CACHE_HOME=$HOME/.cache -export XDG_DATA_HOME=$HOME/.local/share - -declare -A ZINIT -ZINIT[HOME_DIR]=$XDG_CACHE_HOME/zsh/zinit -ZINIT[PLUGINS_DIR]=$XDG_CACHE_HOME/zsh/plugins -ZINIT[SNIPPETS_DIR]=$XDG_CACHE_HOME/zsh/snippets -ZINIT[ZCOMPDUMP_PATH]=$XDG_CACHE_HOME/zsh/zcompdump - -ZPFX=$XDG_CACHE_HOME/zsh/polaris - -export PATH=$HOME/bin:$HOME/.local/bin:$PATH -# Удалить дубликаты в PATH -typeset -U PATH - -export GNUPGHOME=$HOME/.config/gnupg -export SVDIR=$HOME/sv - -# Настройка uncrustify -UNCRUSTIFY_CONFIG="${XDG_CONFIG_HOME}/uncrustify/default.cfg" -[ -e "${UNCRUSTIFY_CONFIG}" ] && export UNCRUSTIFY_CONFIG - -# Настройка Intel Studio -if [ ! -z ${ENABLE_INTEL_STUDIO+x} ]; then - #export COMPILERVARS_ARCHITECTURE=intel64 - #export COMPILERVARS_PLATFORM=linux - #/opt/intel/bin/iccvars.sh - INTEL_VARS=( /opt/intel/advisor/advixe-vars.sh - /opt/intel/inspector/inspxe-vars.sh - /opt/intel/vtune_profiler/vtune-vars.sh ) - - for f in ${INTEL_VARS[*]}; do - [ -e "$f" ] && source "$f" > /dev/null - done -fi - diff --git a/options.zsh b/options.zsh deleted file mode 100644 index 30680e3..0000000 --- a/options.zsh +++ /dev/null @@ -1,16 +0,0 @@ -# https://github.com/wting/autojump -# apt-get install autojump -[[ -s /usr/share/autojump/autojump.sh ]] && source /usr/share/autojump/autojump.sh - -autoload -Uz allopt zed zmv zcalc colors -colors - -autoload -Uz edit-command-line -zle -N edit-command-line -#bindkey -M vicmd v edit-command-line - -autoload -Uz select-word-style -select-word-style shell - -autoload -Uz url-quote-magic -zle -N self-insert url-quote-magic diff --git a/plugins.zsh b/plugins.zsh deleted file mode 100644 index e85e323..0000000 --- a/plugins.zsh +++ /dev/null @@ -1,70 +0,0 @@ -# Менеджер плагинов zinit -if [ ! -d $ZINIT[HOME_DIR] ]; then - git clone https://github.com/zdharma/zinit $ZINIT[HOME_DIR] - zcompile $ZINIT[HOME_DIR]/zinit.zsh -fi - -source $ZINIT[HOME_DIR]/zinit.zsh -autoload -Uz _zinit -(( ${+_comps} )) && _comps[zinit]=_zinit - -# Плагины -zinit load willghatch/zsh-saneopt -zinit load mafredri/zsh-async -zinit load zsh-users/zsh-history-substring-search - -zinit load rupa/z -if [[ "$DISPLAY" != '' ]] && command -v xdotool > /dev/null 2>&1 && command -v wmctrl > /dev/null 2>&1; then - zinit load marzocchi/zsh-notify - zstyle ':notify:*' expire-time 5000 - zstyle ':notify:*' command-complete-timeout 20 - zstyle ':notify:*' enable-on-ssh yes -fi -if command -v peco > /dev/null 2>&1; then - zinit load jimeh/zsh-peco-history -fi - -zinit snippet OMZP::command-not-found -zinit snippet OMZP::common-aliases -zinit snippet OMZP::debian -if command -v fzf > /dev/null 2>&1; then - export DISABLE_FZF_KEY_BINDINGS=true - zinit snippet OMZP::fzf - # fzf - if [ -e /usr/share/doc/fzf/examples/key-bindings.zsh ]; then - . /usr/share/doc/fzf/examples/key-bindings.zsh - fi - if [ -e /usr/share/doc/fzf/examples/completion.zsh ]; then - . /usr/share/doc/fzf/examples/completion.zsh - fi -fi -if command -v git > /dev/null 2>&1; then - zinit snippet OMZP::git - zinit load paulirish/git-open - zinit lucid wait'2' for \ - as"program" pick"$ZPFX/bin/git-*" \ - src"etc/git-extras-completion.zsh" make"PREFIX=$ZPFX" tj/git-extras \ - as"program" make"PREFIX=$ZPFX install" Fakerr/git-recall \ - as"program" load davidosomething/git-my -fi -if command -v psql > /dev/null 2>&1; then - zinit snippet OMZP::postgres -fi -if command -v sudo > /dev/null 2>&1; then - zinit snippet OMZP::sudo -fi -if command -v systemctl > /dev/null 2>&1; then - zinit snippet OMZP::systemd -fi -if command -v vim > /dev/null 2>&1; then - zinit snippet OMZP::vim-interaction -fi -zinit snippet OMZP::web-search - -zinit load djui/alias-tips - -zstyle ':prezto:module:tmux:auto-start' local 'no' -zstyle ':prezto:module:tmux:auto-start' remote 'yes' -zstyle ':prezto:module:tmux:session' name "$(hostname)" -zinit snippet PZTM::tmux -