From a532dd67ff224846f99390ff2bd934503f7697a0 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 17 Jun 2020 12:50:59 +0200 Subject: zsh: leverage declarative installs instead of checking for binaries --- user/zsh/zshrc | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) (limited to 'user/zsh/zshrc') diff --git a/user/zsh/zshrc b/user/zsh/zshrc index 3ec35c65..771e96db 100644 --- a/user/zsh/zshrc +++ b/user/zsh/zshrc @@ -67,14 +67,6 @@ bindkey '\e ' hist-complete zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|=*' 'l:|=* r:|=*' zstyle ':completion:*' completer _expand _complete _match -# Plugins - -if [[ -n $commands[helm] ]] -then - autoload _helm - compdef _helm helm -fi - # General configuration if [[ $TERM == "dumb" ]] @@ -116,23 +108,20 @@ else AGKOZAK_CUSTOM_RPROMPT='${prompt_context}%(3V.%F{${AGKOZAK_COLORS_BRANCH_STATUS}%3v%f.)' fi -if [[ -n $commands[fzf] ]] -then - export FZF_CTRL_T_COMMAND=' - (git ls-tree -r --name-only HEAD || - fd --hidden --follow --exclude ".git" . | - sed s/^..//) 2> /dev/null' - export FZF_ALT_C_COMMAND='fd --type d --hidden --follow --exclude ".git" .' - export FZF_DEFAULT_COMMAND=$FZF_CTRL_T_COMMAND +export FZF_CTRL_T_COMMAND=' + (git ls-tree -r --name-only HEAD || + fd --hidden --follow --exclude ".git" . | + sed s/^..//) 2> /dev/null' +export FZF_ALT_C_COMMAND='fd --type d --hidden --follow --exclude ".git" .' +export FZF_DEFAULT_COMMAND=$FZF_CTRL_T_COMMAND - bindkey '^t' transpose-chars - bindkey '^x^f' fzf-file-widget +bindkey '^t' transpose-chars +bindkey '^x^f' fzf-file-widget - zstyle ":anyframe:selector:fzf:" command "fzf --height 40%" +zstyle ":anyframe:selector:fzf:" command "fzf --height 40%" - bindkey '\es' anyframe-widget-cd-ghq-repository - bindkey '\ej' anyframe-widget-cd-ghq-repository - bindkey '^x^k' anyframe-widget-kill -fi +bindkey '\es' anyframe-widget-cd-ghq-repository +bindkey '\ej' anyframe-widget-cd-ghq-repository +bindkey '^x^k' anyframe-widget-kill unsetopt flow_control # Let me use ^S and ^Q -- cgit 1.4.1