-
Notifications
You must be signed in to change notification settings - Fork 18
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
Support inline expansion of Git abbreviations #33
Conversation
90e90c6
to
e062ba4
Compare
This doesn't actually work correctly yet; it still expands when the command starts with something other than |
The existing Git alias functionality generates global abbreviations prefixed with "g". This is not ideal as it can clobber many other commands or aliases. This commit introduces functionality that allows for inline expansion of Git abbreviations, provided they are typed on a line that starts with the word "git". Suppose you have a Git alias fp="fetch --prune"; typing "git fp" and pressing Space will expand to "git fetch --prune". However, it will not expand if the first word of the command line is not "git". It introduces a --git flag, analogous to the --global flag, that can be used to add a Git abbreviation.
e062ba4
to
d5539b7
Compare
Interesting. Before you sink too much time into it, can you explain the use case? I'm excited to see what you do but heads up this week's really busy so I may be slow to respond. [edit: I personally drop the |
No worries, whenever you have time. The use case for me is: Just like I never want to type It looks like it behaves now w.r.t. non-
|
(And sorry for the crossed wires, missed the issue you opened. Between that and my |
Let's continue the broader convo over to #32 (no rush on a reply though) |
Closing in favor of possibly supporting multi-word command-position abbreviations, see 32 for discussion. Cool stuff tho! |
The existing Git alias functionality generates global abbreviations prefixed with "g". This is not ideal as it can clobber many other
commands or aliases.
This commit introduces functionality that allows for inline expansion of Git abbreviations, provided they are typed on a line that starts with the word "git".
It introduces a
--git
flag, analogous to the--global
flag, that can be used to add a Git abbreviation.Resolves #32.