Skip to content

This can/should co-exist with alias-tips #51

Answered by olets
sagarkar10 asked this question in Ideas
Discussion options

You must be logged in to vote

Thanks for the idea!

alias-tips has an excludes array (https://github.com/djui/alias-tips#exclude-some-aliases). If for every abbreviation you have an alias with the same short form (for example, alias x="my command" and abbr x="my command") then adding this snippet to your .zshrc should automatically exclude all abbreviations when the shell initializes:

export ZSH_PLUGINS_ALIAS_TIPS_EXCLUDES="${(f)$(abbr l)}"

(that is, a single string from abbr l's multi-line output). If you're already excluding things,

export ZSH_PLUGINS_ALIAS_TIPS_EXCLUDES="myalias ${(f)$(abbr l)}"

After adding a new abbreviation, open a new terminal and/or refresh open terminals (source ~/.zshrc or, preferably, exec zsh

Replies: 7 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by olets
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@olets
Comment options

@sagarkar10
Comment options

@olets
Comment options

Comment options

You must be logged in to vote
3 replies
@olets
Comment options

@p1r473
Comment options

@olets
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #47 on December 21, 2021 23:18.