From c6f3e125c2284b27300b30d1134909e264c459ef Mon Sep 17 00:00:00 2001 From: Toby Vincent Date: Fri, 18 Feb 2022 21:57:14 -0600 Subject: feat: added navi configs and fixed manpager --- zsh/zshrc | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'zsh/zshrc') diff --git a/zsh/zshrc b/zsh/zshrc index 2c7a8fb..32b74df 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -27,27 +27,26 @@ fpath=(~/.local/share/zsh/site-functions "${fpath[@]}") source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh for f in ~/.zsh/*.*sh; do source $f; done - # fzf settings -export FZF_DEFAULT_COMMAND='fd --type f' +export FZF_DEFAULT_COMMAND="fd --type f || git ls-tree -r --name-only HEAD || rg --files || find ." export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" -_fzf_compgen_path() { +command -v fd &>/dev/null && _fzf_compgen_path() { fd --hidden --follow --exclude ".git" . "$1" } -_fzf_compgen_dir() { +command -v fd &>/dev/null && _fzf_compgen_dir() { fd --type d --hidden --follow --exclude ".git" . "$1" } -# starship prompt -eval "$(starship init zsh)" +eval "$(starship init zsh 2>/dev/null)" +eval "$(navi widget zsh 2>/dev/null)" -function set_win_title() { - folder=$(sed "s/$USER/~/g" <<<$PWD:t) +set_win_title() { + folder=$(sed "s/$USER/~/g" <<<$PWD:t) - window_title="\033]0;$USER@$HOST: $folder\007" - echo -ne "$window_title" + window_title="\033]0;$USER@$HOST: $folder\007" + echo -ne "$window_title" } precmd_functions+=(set_win_title) -- cgit v1.2.3-70-g09d2