From e6bc9a8fdfe4e49ce96fa31552954a116cb8c07b Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Thu, 16 Nov 2023 00:28:34 +0800 Subject: Refactor --- .config/fish/conf.d/init-fzf.fish | 9 +++++++++ .config/fish/config.fish | 6 ++++-- .config/fish/functions/init_fzf.fish | 11 ----------- 3 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 .config/fish/conf.d/init-fzf.fish delete mode 100644 .config/fish/functions/init_fzf.fish (limited to '.config/fish') diff --git a/.config/fish/conf.d/init-fzf.fish b/.config/fish/conf.d/init-fzf.fish new file mode 100644 index 0000000..d1c2d33 --- /dev/null +++ b/.config/fish/conf.d/init-fzf.fish @@ -0,0 +1,9 @@ +command -v fzf > /dev/null || exit 0 + +if is_mac; + source $(brew --prefix fzf)/shell/key-bindings.fish +end + +function fish_user_key_bindings + fzf_key_bindings +end diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 14c8150..6a16e19 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -1,8 +1,10 @@ if status is-interactive - set -U fish_greeting + set -g fish_greeting + set -g __fish_git_prompt_showdirtystate 1 + set -g __fish_git_prompt_showuntrackedfiles 1 + set -g __fish_git_prompt_showcolorhints 1 command -v zoxide > /dev/null && zoxide init --cmd j fish | source command -v navi > /dev/null && eval "$(navi widget fish)" - init_fzf if command -v nnn > /dev/null; set -l function_file "$HOME/.config/fish/functions/n.fish" diff --git a/.config/fish/functions/init_fzf.fish b/.config/fish/functions/init_fzf.fish deleted file mode 100644 index b1fab2a..0000000 --- a/.config/fish/functions/init_fzf.fish +++ /dev/null @@ -1,11 +0,0 @@ -function init_fzf - command -v fzf > /dev/null || exit 0 - - if is_mac; - source $(brew --prefix fzf)/shell/key-bindings.fish - end - - function fish_user_key_bindings - fzf_key_bindings - end -end -- cgit v1.2.3