Closed devajmeireles closed 1 year ago
Hey, @ajmeireles! Maybe it's something in your config.fish. Paste it here please?
I'm having a similar issue. But rather than the plugin being removed, I think it's just that the abbreviations don't work.
config.fish
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
status is-interactive && eval /Users/zephaniahong/opt/anaconda3/bin/conda "shell.fish" "hook" $argv | source
# <<< conda initialize <<<
# I've tried removing the following lines as well but it did not fix the issue
if status --is-login
set -gx PATH $PATH /opt/homebrew/bin
end
@zephaniahong I don't think your config is interfering with Fisher, so your issue might be something else.
If I run
echo $fisher_path
Should I be expecting an output? Mine seems to be blank.
Also, I notice that the functions in /Users/zephaniahong/.config/fish/functions
with their own files work fine e.g. gdt, ggp etc... but the abbreviations that are in __git.init.fish
do not seem to work
What plugins are you currently using?
I see these 4 when I run fisher list
:
jorgebucaran/fisher
jethrokuan/z
ilancosman/tide@v5
jhillyerd/plugin-git
What happens if you uninstall that git plug-in and start a new shell? Do your abbreviations work now? Also try commenting everything in your config.
Nope! The abbreviations come from the plugin so they are gone when I uninstall.
These are the files that get downloaded.
All the functions work. But the abbreviations that exist in the __git.init.fish file don't seem to work when I open another shell.
the __git.init.fish file looks something like this:
function __git.init
function __git.create_abbr -d "Create Git plugin abbreviation"
set -l name $argv[1]
set -l body $argv[2..-1]
abbr -a $name $body
set -a __git_plugin_abbreviations $name
end
set -q __git_plugin_initialized; and return 0
set -U __git_plugin_abbreviations
# git abbreviations
__git.create_abbr g git
__git.create_abbr ga git add
__git.create_abbr gaa git add --all
# Cleanup declared functions
functions -e __git.create_abbr
# Mark git plugin as initialized
set -U __git_plugin_initialized (date)
end
Maybe that plugin doesn't work well with Fisher. See also https://github.com/jhillyerd/plugin-git/pull/49
This is https://github.com/jhillyerd/plugin-git/pull/88.
The underlying issue is that fish 3.6.0's new and improved abbreviations won't be stored in universal variables anymore, so the plugin creates global abbreviations and then doesn't re-add them in subsequent shells.
As a workaround I believe this should work:
set -e __git_plugin_initialized
__git.init
I don't believe it has anything to do with fisher.
Thanks for chiming in, @faho.
Hey, @jorgebucaran ! First of all thank you for your work.
Can you help me? I'm having a strange problem. Whenever I install a plugin it gets removed when I restart the terminal. I'm installing the plugin: https://github.com/jhillyerd/plugin-git and when I close the terminal it doesn't exist anymore in the abbreviations, and I need to install again (using Fisher).
What am I doing wrong?