From 2b86db67c32bd65b961b6ab27b3896bc051e1df2 Mon Sep 17 00:00:00 2001 From: Olexandr Smirnov Date: Wed, 23 Jul 2025 23:45:53 +0300 Subject: [PATCH] fish: move fish_greeting to sep function, set $EDITOR only when vim is found --- config/fish/config.fish | 15 ++++++--------- config/fish/functions/fish_greeting.fish | 5 +++++ 2 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 config/fish/functions/fish_greeting.fish diff --git a/config/fish/config.fish b/config/fish/config.fish index e58b7e6..78e9b91 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -1,6 +1,3 @@ -set -gx EDITOR nvim -set -gx VISUAL nvim - set -g GOPATH $HOME/go set -g GOBIN $GOPATH/bin @@ -10,18 +7,18 @@ set -g PATH $HOME/.local/bin $PATH set -g PATH node_modules/.bin $PATH set -g PATH .bin $PATH + +if type -q nvim + set -gx EDITOR nvim + set -gx VISUAL nvim +end + if status is-interactive starship init fish | source zoxide init fish | source mise activate fish | source direnv hook fish | source - function fish_greeting - if type -q todo.sh - TODOTXT_VERBOSE=0 todo.sh listpri a - end - end - function fish_user_key_bindings fish_vi_key_bindings end diff --git a/config/fish/functions/fish_greeting.fish b/config/fish/functions/fish_greeting.fish new file mode 100644 index 0000000..20f97f7 --- /dev/null +++ b/config/fish/functions/fish_greeting.fish @@ -0,0 +1,5 @@ +function fish_greeting + if type -q todo.sh + TODOTXT_VERBOSE=0 todo.sh listpri a + end +end