-
Notifications
You must be signed in to change notification settings - Fork 19
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
This can/should co-exist with alias-tips #47
Comments
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, export ZSH_PLUGINS_ALIAS_TIPS_EXCLUDES="${(f)$(abbr l)}" (that is, a single string from export ZSH_PLUGINS_ALIAS_TIPS_EXCLUDES="myalias ${(f)$(abbr l)}" After adding a new abbreviation, open a new terminal and/or refresh open terminals ( Does that meet your need? |
Yes, that's exactly what I needed! Feeling stupid, didn't figure out myself! |
Also, a 2nd thought, we should auto sync |
I've chosen to not support auto syncing because it would require letting abbr write and possibly first parse You could do something like
Putting it at the very end of your // Another approach: run abbr import-aliases once and then delete as many aliases as possible. That's my personal recommendation. It would probably even obviate your alias-tips problem. If you decide to switch back to aliases, run |
I understand both the workarounds you proposed! Someone might want to use both What I suggest is
Let me know if that makes sense, I can add a PR, or we can discuss in more details about the implementation! |
Interesting idea! For now, it doesn't feel to me like syncing abbreviations and aliases is something zsh-abbr should take on — it's sort of a meta responsibility. But let's keep thinking it through. //
Now and then I consider making a "delete all abbreviations" function… But I'm afraid if it existed I'd run it by mistake! The easiest way to roll your own will be echo > $ABBR_USER_ABBREVIATIONS_FILE
abbr load
I'm not aware of a way to do this, but sounds cool. Are you? // What if you invert my previous idea, letting aliases be the source of truth # .zshrc
source .zsh-aliases
# load zsh-abbr and then
abbr import-aliases --quiet and to add an alias and an abbreviation use % echo alias x=y > .zsh-aliases && exec zsh (Could make a function for that, and |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
That would be awesome if we can skip
alias-tips
repo suggestions if the command is coming fromzsh-abbr
Does it make sense to use both? Thoughts?
The text was updated successfully, but these errors were encountered: