autocomplete
autocomplete copied to clipboard
[git] shell-aliased git aliases don't work
Sanity checks
- [X] My issue relates to a specific CLI completion spec (e.g.
git checkout
is missing options ingit
completion spec). If your issue is more general, please create your issue here: withfig/fig - [X] I have searched github.com/withfig/autocomplete/issues and there are no duplicates of my issue
- [ ] I would like to work on this.
What CLI tool does this relate to?
git
Which statement makes the most sense?
There is a bug with this completion spec
Issue Details
Shell aliases eg. alias a=b
don't work when the aliased command is a git alias
- Create a git alias, eg.
git config --global alias.co checkout
- Verify it works
- Add an alias to your config:
alias gco="git co"
- Restart fig
- Type
gco
, observe (no) completions
This might also be an autocomplete-engine problem, not sure
I am also having this issue.
some of my alias's work some don't...
# don't work
alias a=amplify
alias as="a status"
alias apush="a push"
alias apub="a publish"
alias politlyAskFigToRestart="sudo bash ~/projects/scripts/i-love-fig.sh"
alias new_project="bash ~/projects/scripts/new_project.sh"
alias npro=new_project
# works
alias y=yarn
@ShawnCockburn strange - I think you might actually be running into a separate issue. I can reproduce this too
@ShawnCockburn strange - I think you might actually be running into a separate issue. I can reproduce this too
I might be yes, ill make a new issue!
thanks @SeparateRecords
I have an alias alias git="noglob git"
setup which Fig doesn't seem to pick up (autocomplete doesn't work at all for the alias). Is that the same issue as this one?
Slightly different, I think the issue is that fig doesn't understand noglob
. It sees it as a command, looks up the completion, doesn't find it, then stops completing.
The proper solution to this is to update the parser, the quick solution is to add a noglob command to this repo - I'll do this now as a stopgap solution 🙂 #1147
This issue is specifically that shell aliases eg. alias a=b
don't work when the aliased command is a git alias