3 ms·
You might be interested in this: https://mikegerwitz.com/projects/git-shortmaps/about/ https://mikegerwitz.com/projects/git-shortmaps/about/ It creates the al
by mikegerwitz 9y ago
You might be interested in this:
https://mikegerwitz.com/projects/git-shortmaps/about/ https://mikegerwitz.com/projects/git-shortmaps/about/
It creates the aliases as you do, but also includes tab completion, and only takes effect when you're in a repository path.
- cormacrelf 9y agoIf shell aliases don't tab-complete for you, you can get tab completion just by defining git aliases instead. One extra space if you also alias g=git. And it solves namespacing.
- mikegerwitz 9y agoI meant that the alias `b` for `git branch` will have the same bash completion as `git branch`, e.g. branch names.
- mort96 9y agoI don't know if it's the same in bash, but at least in zsh, "git branch <TAB>" and "b <TAB>" have the exact same result, if b is aliased to "git branch"; the first tab fills in the name of the branch, another lets me select a commit, and further tabs are command line options.
- mikegerwitz 9y agoThat would make sense! Alas, that is not the case with bash.