Closed alexanderjeurissen closed 2 years ago
Sorry for the delay!
I'm not able to reproduce, do you still have this issue? Also, does it occurs only with gws
and glg
abbreviations?
Hi @gazorby thanks for following up.
I still have the issue presently. It not only happens with the git abbreviations but with any abbreviation.
I added a zipped screen recording to showcase the issue.
From the looks of it if you wait for a second or two after expanding the abbreviation the hint is not shown. If you are fast and you hit enter after expanding the abbreviation it will incorrectly suggest you should have used an abbreviation.
Hi @alexanderjeurissen
Thanks for the detail, your problem looks pretty weird. Do you have any other fish plugins installed? If so, i suggest you uninstall them and keep only fish-abbreviation-tips to see if there would be any potential overlap.
fish-abbreviation-tips has bindings to space and newline to detect if an abbreviation was used, if you have another fish plugin overriding some of these bindings, it could be the cause of the bug.
I'm having the same problem, it happens with all of my abbreviations, not just git ones. Checked the key bindings also, space & enter are properly bound to __abbr_tips_bind_space
and __abbr_tips_bind_newline
This has been happening to me recently as well. Not sure if it's a coincidence but it seemed to have coincided with when I upgraded to fisher 4
Any news on this? I'm still unable to reproduce this issue.
I even tried in a clean ubuntu:latest
docker container and didn't notice any wrong suggestion.
Can you try cleaning your fisher environment and only reinstalling abbreviation-tips?
Before reinstalling, ensure the following variables are removed:
__abbr_tips_used
__abbr_tips_run_once
__ABBR_TIPS_VALUES
__ABBR_TIPS_KEYS
ABBR_TIPS_PROMPT
ABBR_TIPS_AUTO_UPDATE
ABBR_TIPS_ALIAS_WHITELIST
ABBR_TIPS_REGEXES
Also make sure these functions doesn't exist anymore:
__abbr_tips_init
__abbr_tips_bind_newline
__abbr_tips_bind_space
__abbr_tips
If all of the above is gone then you should be in a clean environment.
I've checked that all the variables/functions were removed. Been a while since I've used this plugin but it appears that it only happens with abbr (aliases seem to work fine) e.g. for abbr g -> git
g<Space>status<CR>
I have a bunch of plugins installed so when I have the chance, I'll test it with just abbr tips
I can confirm this is happening for me as well.
I have a single abbreviation defined in config.fish
:
# Abbreviations
if status --is-interactive
# Git
abbr --add --global gs "git status"
end
I'm using the status --is-interactive
conditional as it's described in the docs: https://fishshell.com/docs/current/cmds/abbr.html#internals
Though this might not be ideal because I had to run __abbr_tips_init
manually for the abbreviation tip to show.
Edit: I've just tested adding a new abbreviation interactively via abbr --add gf "git fetch"
instead and that also didn't show up without me running __abbr_tips_init
manually, not even closing all instances of fish and restarting.
So I'm not sure what the "best practice" would be here (I just started giving fish a try after using zsh for years, so I'm not really familiar with it yet).
It doesn't matter if I run git status
or gs
, the abbreviation tip will be shown in both cases.
Using fish version 3.2.1
on Arch Linux.
Other plugins installed are:
@alexanderjeurissen, @NovaDev94 @petertriho, @mserajnik a fix has been merged to enable bindings when using vi mode, can you update the plugin and check if it's fixed?
@gazorby Awesome! That fixed it for me
Describe the bug
suggestions/tips are shown to use a certain abbreviation even though the abbrevations was used.
To Reproduce
Using the following abbreviations derived from Prezto git aliases for zsh:
When acting uppon a tip
git status --ignore-submodules=all --short
it shows the suggestion to usegws
sofar so good.gws
it expands to the above. When pressing enter it still suggests to usegws
even though I did use that abbreviation.When using an abbreviation straight away
glg
glg
instead of the expanded versionExpected behavior When using an abbreviation, don't re-suggest to use the abbreviation.
Screenshots
System (please complete the following information): fish, version 3.1.2