Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__abbr_tips_init not running automatically #17

Closed
gczarnocki opened this issue Aug 27, 2021 · 3 comments
Closed

__abbr_tips_init not running automatically #17

gczarnocki opened this issue Aug 27, 2021 · 3 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@gczarnocki
Copy link

Question

Hello! First of all, thanks for this plugin for Fish, really appreciated. Helps when using lots of aliases.

I have a question about __abbr_tips_init because it seems that it's not running automatically when I modify my aliases:

I've added an abbreviation: abbr -a -U -- g 'git' and running git doesn't show abbr:

(...)
See 'git help git' for an overview of the system.

After running __abbr_tips_init, it's shown:

See 'git help git' for an overview of the system.

💡 g => git

My Fish version:

fish, version 3.3.1

System version:

Manjaro 21 Ornara

neofetch 
██████████████████  ████████   ...
██████████████████  ████████   ----------------- 
██████████████████  ████████   OS: Manjaro Linux x86_64 
██████████████████  ████████   Host: ...
████████            ████████   Kernel: 5.10.59-1-MANJARO 
████████  ████████  ████████   Uptime: 2 days, 22 hours, 4 mins 
████████  ████████  ████████   Packages: 1283 (pacman) 
████████  ████████  ████████   Shell: fish 3.3.1 
████████  ████████  ████████   Resolution: 1920x1080, 1920x1080 
████████  ████████  ████████   DE: Plasma 5.22.4 
████████  ████████  ████████   WM: KWin 
████████  ████████  ████████   Theme: Breath2 2021 Dark [Plasma], Breath [GTK2/3] 
████████  ████████  ████████   Icons: [Plasma], breath2 [GTK2/3] 
████████  ████████  ████████   Terminal: vscode

Fisher plugins:

jorgebucaran/fisher
PatrickF1/fzf.fish
jethrokuan/z
gazorby/fish-abbreviation-tips
danhper/fish-ssh-agent

I haven't seen anything in documentation about running this above command manually and I am wondering if there's some problem on my end.

@gczarnocki gczarnocki added the question Further information is requested label Aug 27, 2021
@gczarnocki gczarnocki changed the title __abbr_tips_init not run automatically __abbr_tips_init not running automatically Aug 27, 2021
@gazorby
Copy link
Owner

gazorby commented Oct 21, 2021

Hi @gczarnocki

__abbr_tips_init is only called once when plugin is installed to generate tips for existing aliases. Then a function is called each time you type a command and checks when you are using abbr -a to add a new abbreviation, and if so, tips are updated.

@gazorby
Copy link
Owner

gazorby commented Oct 21, 2021

I'm able to reproduce this bug, it seems that using -U and -- to pass arguments prevents the plugin to detect that you are adding a new abbreviation

Using abbr -a g 'git' should works

@gazorby
Copy link
Owner

gazorby commented Oct 21, 2021

e877e28 on master should fix this. You should now be able to pass any options to abbr along with arguments

@gczarnocki can you confirm?

@gazorby gazorby added the help wanted Extra attention is needed label Oct 21, 2021
@gazorby gazorby closed this as completed Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants