-
Notifications
You must be signed in to change notification settings - Fork 7
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
Don't show tips when history is used #15
Comments
Hi @mamiu! Currently the plugin doesn't remember how abbreviations are triggered, so it's not possible for now. I'm also interested in this feature, I'll take a look at it when I have some time. |
@gazorby Ok get it. Thanks for taking care of it. I just played around right now and found a workaround which works, but is probably not the best solution. In the # history-search-backward wrapper for the fish-abbreviation-tips plugin
function __abbr_tips_history_backward
set -g __abbr_tips_used 1
commandline -f history-search-backward
end
# user defined key bindings
function fish_user_key_bindings
bind \e\[A __abbr_tips_history_backward # arrow up key
# If you use other key bindings that use the history-search-backward function make sure they also call the custom __abbr_tips_history_backward function
end |
This also affects custom keybindings that add a command that has an abbreviation. eg. I use set -x EDITOR 'nvim'
# ...
abbr nv "$EDITOR"
# ...
bind \co "commandline -i ' $EDITOR '; commandline -f backward-kill-word beginning-of-line yank execute" But function launch_editor
set -g __abbr_tips_used 1
commandline -i " $EDITOR "
commandline -f backward-kill-word beginning-of-line yank execute
end
bind \co launch_editor |
I usually use the history a lot. (E.g. the up arrow key or CTRLR from fzf)
But when using the history I don't want to see the tips.
Is that already possible and if so how?
The text was updated successfully, but these errors were encountered: