From 0a08004ae1cbda1bb1b801cc49c0bfd8b9dd461e Mon Sep 17 00:00:00 2001 From: Shawn Anderson Date: Wed, 17 May 2023 20:41:12 -0700 Subject: [PATCH] Update fish. --- dotfiles/.config/fish/config.fish | 2 ++ dotfiles/.config/fish/config/abbr.fish | 6 ++++++ dotfiles/.config/fish/functions/envsource.fish | 11 +++++++++++ dotfiles/.config/fish/functions/fish_prompt.fish | 3 ++- 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 dotfiles/.config/fish/functions/envsource.fish diff --git a/dotfiles/.config/fish/config.fish b/dotfiles/.config/fish/config.fish index 8615be7..ee94bed 100644 --- a/dotfiles/.config/fish/config.fish +++ b/dotfiles/.config/fish/config.fish @@ -12,3 +12,5 @@ source ~/.config/fish/config/plugins.fish source ~/.config/fish/config/programs.fish set -gx GOPATH $HOME/go; set -gx GOROOT $HOME/.go; set -gx PATH $GOPATH/bin $PATH; # g-install: do NOT edit, see https://github.com/stefanmaric/g + +export PATH="$PATH:/home/ygg/.foundry/bin" diff --git a/dotfiles/.config/fish/config/abbr.fish b/dotfiles/.config/fish/config/abbr.fish index 752d6d3..b8447aa 100644 --- a/dotfiles/.config/fish/config/abbr.fish +++ b/dotfiles/.config/fish/config/abbr.fish @@ -24,3 +24,9 @@ end if type rg &> /dev/null abbr grep rg end + +# Lunarvim +#abbr nvim lvim +#abbr vim lvim +abbr nvim nvim +abbr vim nvim diff --git a/dotfiles/.config/fish/functions/envsource.fish b/dotfiles/.config/fish/functions/envsource.fish new file mode 100644 index 0000000..cfe2a46 --- /dev/null +++ b/dotfiles/.config/fish/functions/envsource.fish @@ -0,0 +1,11 @@ +# e.g. ~/.config/fish/functions/envsource.fish +# +# Usage: envsource + +function envsource + for line in (cat $argv | grep -v '^#') + set item (string split -m 1 '=' $line) + set -gx $item[1] $item[2] + echo "Exported key $item[1]" + end +end diff --git a/dotfiles/.config/fish/functions/fish_prompt.fish b/dotfiles/.config/fish/functions/fish_prompt.fish index 42abb6d..47b1f8e 100644 --- a/dotfiles/.config/fish/functions/fish_prompt.fish +++ b/dotfiles/.config/fish/functions/fish_prompt.fish @@ -17,7 +17,8 @@ function fish_prompt set -l normal (set_color normal) if set -q VIRTUAL_ENV - echo -n -s (set_color white) "🐍(" (basename "$VIRTUAL_ENV") ")" (set_color normal) " " + echo -n -s (set_color white) "(🐍"-(basename "$VIRTUAL_ENV")")" (set_color normal) " " + #echo -n -s "(vf🐍)" end set -l cwd (pwd | sed -e "s!^$HOME!~!g")