From 00bd63ccc6e6b22e8dee71ef9ec2ad0089421f44 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Sat, 6 Nov 2021 19:50:38 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D1=85=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BC=D0=B5=D0=BD=D0=B5=D0=B4=D0=B6=D0=B5=D1=80?= =?UTF-8?q?=20https://github.com/jandamm/zgenom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .zshrc | 42 +++++++-------------- env.zsh => 15-env.zsh | 35 +++++++++++------ history.zsh => 25-history.zsh | 5 +-- options.zsh => 35-options.zsh | 9 ++++- 45-plugins.zsh | 66 ++++++++++++++++++++++++++++++++ agents.zsh => 55-agents.zsh | 7 ++-- prompt.zsh => 65-prompt.zsh | 4 +- aliases.zsh => 75-aliases.zsh | 12 +----- 78-scripts.zsh | 57 ++++++++++++++++++++++++++++ 85-compinit.zsh | 42 +++++++++++++++++++++ 95-finish.zsh | 3 ++ README.md | 19 +++++----- compinit.zsh | 27 ------------- plugins.zsh | 71 ----------------------------------- 14 files changed, 230 insertions(+), 169 deletions(-) rename env.zsh => 15-env.zsh (50%) rename history.zsh => 25-history.zsh (92%) rename options.zsh => 35-options.zsh (56%) create mode 100644 45-plugins.zsh rename agents.zsh => 55-agents.zsh (77%) rename prompt.zsh => 65-prompt.zsh (91%) rename aliases.zsh => 75-aliases.zsh (78%) create mode 100644 78-scripts.zsh create mode 100644 85-compinit.zsh create mode 100644 95-finish.zsh delete mode 100644 compinit.zsh delete mode 100644 plugins.zsh diff --git a/.zshrc b/.zshrc index e5ef844..be73f87 100644 --- a/.zshrc +++ b/.zshrc @@ -1,32 +1,18 @@ -zmodload zsh/zprof - for S in \ - "$ZDOTDIR/env.start.zsh" \ - "$ZDOTDIR/env.zsh" \ - "$ZDOTDIR/env.user.zsh" \ - \ - "$ZDOTDIR/history.zsh" \ - "$ZDOTDIR/history.user.zsh" \ - \ - "$ZDOTDIR/options.zsh" \ - "$ZDOTDIR/options.user.zsh" \ - \ - "$ZDOTDIR/plugins.zsh" \ - "$ZDOTDIR/plugins.user.zsh" \ - \ - "$ZDOTDIR/agents.zsh" \ - "$ZDOTDIR/agents.user.zsh" \ - \ - "$ZDOTDIR/prompt.zsh" \ - "$ZDOTDIR/prompt.user.zsh" \ - \ - "$ZDOTDIR/aliases.zsh" \ - "$ZDOTDIR/aliases.user.zsh" \ - \ - "$ZDOTDIR/compinit.zsh" \ - "$ZDOTDIR/compinit.user.zsh" \ - ; - do [ -e "$S" ] && source "$S" + 05-start \ + 15-env \ + 25-history \ + 35-options \ + 45-plugins \ + 55-agents \ + 65-prompt \ + 75-aliases \ + 78-scripts \ + 85-compinit \ + 95-finish +do + [ -e "$ZDOTDIR/$S.zsh" ] && source "$ZDOTDIR/$S.zsh" + [ -e "$ZDOTDIR/$S.user.zsh" ] && source "$ZDOTDIR/$S.user.zsh" done true diff --git a/env.zsh b/15-env.zsh similarity index 50% rename from env.zsh rename to 15-env.zsh index 0cdfa9a..26cdb1b 100644 --- a/env.zsh +++ b/15-env.zsh @@ -1,21 +1,32 @@ -export XDG_CONFIG_HOME=$HOME/.config -export XDG_CACHE_HOME=$HOME/.cache -export XDG_DATA_HOME=$HOME/.local/share +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 +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" +ZPFX=$ZGEN_DIR/polaris -ZPFX=$XDG_CACHE_HOME/zsh/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 -export PATH=$HOME/bin:$HOME/.local/bin:$PATH # Удалить дубликаты в PATH typeset -U PATH -export GNUPGHOME=$HOME/.config/gnupg -export SVDIR=$HOME/sv +export GNUPGHOME="$XDG_CONFIG_HOME/gnupg" +export SVDIR="$HOME/sv" # Настройка uncrustify UNCRUSTIFY_CONFIG="${XDG_CONFIG_HOME}/uncrustify/default.cfg" 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/options.zsh b/35-options.zsh similarity index 56% rename from options.zsh rename to 35-options.zsh index 30680e3..9e332c9 100644 --- a/options.zsh +++ b/35-options.zsh @@ -2,15 +2,22 @@ # apt-get install autojump [[ -s /usr/share/autojump/autojump.sh ]] && source /usr/share/autojump/autojump.sh +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 +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..af221ad --- /dev/null +++ b/45-plugins.zsh @@ -0,0 +1,66 @@ +# Менеджер плагинов 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/command-not-found +zgenom ohmyzsh plugins/systemadmin +zgenom ohmyzsh plugins/common-aliases +zgenom ohmyzsh plugins/debian +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 + 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 78% rename from aliases.zsh rename to 75-aliases.zsh index f56b6f1..a2619a4 100644 --- a/aliases.zsh +++ b/75-aliases.zsh @@ -22,14 +22,6 @@ aptf() { apt-cache search $1 | grep $2 fi } -aptl() { - [ -z $1 ] && return 1 - sudo apt-get purge linux-modules-extra-"$1".* linux-modules-"$1".* linux-tools-"$1".* \ - linux-image-"$1".* linux-image-unsigned-"$1".* linux-headers-"$1".* -} - -# VIM -alias gvim='gvim --remote-silent' # Youtube YDL="$HOME/bin/youtube-dl" @@ -49,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..0a8a055 --- /dev/null +++ b/85-compinit.zsh @@ -0,0 +1,42 @@ +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 + +# 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 726a289..b7070de 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ sudo apt-get install zsh Установка желательных пакетов: ```sh -sudo apt-get install keychain peco fzf wmctrl xdotool autojump git ssh-askpass +sudo apt-get install keychain peco fzf wmctrl xdotool autojump ``` Клонирование репозитория в каталог `~/.config/zsh`: @@ -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,7 +45,7 @@ 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 агента @@ -53,8 +53,7 @@ cp ~/.config/zsh/agents.zsh ~/.config/zsh/agents.user.zsh Раскомментировать в файле ` ~/.config/zsh/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`: @@ -81,7 +80,7 @@ pinentry-program /usr/bin/pinentry-qt # 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` правило для разрешения агенту сохранять ключи: @@ -105,7 +104,7 @@ Host * # 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` и необходимые плагины. ## Обновление @@ -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/plugins.zsh b/plugins.zsh deleted file mode 100644 index 94b5b25..0000000 --- a/plugins.zsh +++ /dev/null @@ -1,71 +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 - zstyle ':notify:*' always-check-active-window 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 'no' -zstyle ':prezto:module:tmux:session' name "$(hostname)" -zinit snippet PZTM::tmux -