diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index ab0796b0..7e2b3385 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -7,6 +7,7 @@ if ! zgen saved; then zgen load zsh-users/zsh-history-substring-search zgen load zdharma/history-search-multi-word zgen load zsh-users/zsh-completions src + zgen load junegunn/fzf shell if [[ -z $SSH_CONNECTION ]]; then zgen load zdharma/fast-syntax-highlighting @@ -42,6 +43,14 @@ function _cache { source $cache || rm -f $cache } +# fd > find +if command -v fd >/dev/null; then + export FZF_DEFAULT_OPTS="--reverse" + export FZF_DEFAULT_COMMAND="fd . $HOME" + export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" + export FZF_ALT_C_COMMAND="fd -t d . $HOME" +fi + _cache fasd --init posix-alias zsh-{hook,{c,w}comp{,-install}} _cache direnv hook zsh diff --git a/modules/shell/zsh.nix b/modules/shell/zsh.nix index 5bc0d7d3..2f6bbcaf 100644 --- a/modules/shell/zsh.nix +++ b/modules/shell/zsh.nix @@ -18,6 +18,7 @@ in bat exa fd + fzf tmux htop tree