aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/zsh/zshrc
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2022-02-18 21:57:14 -0600
committerToby Vincent <tobyv13@gmail.com>2022-02-18 21:57:14 -0600
commitc6f3e125c2284b27300b30d1134909e264c459ef (patch)
tree247e24bd4800fdc6f9502e0a42a6a8775b659f09 /zsh/zshrc
parentbb534a0e4085bbb3c7a2cdcd1e5c4abd25ea7da5 (diff)
feat: added navi configs and fixed manpager
Diffstat (limited to 'zsh/zshrc')
-rw-r--r--zsh/zshrc19
1 files changed, 9 insertions, 10 deletions
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)