Closed planetceres closed 4 years ago
Well, I feel that with alf it is much less necessary than opcode, since:
However, I am open to it.
Hey - I think this can be easily achieved, by doing this:
I can make alf generate
also append completion commands to the end of the result (which normally goes into ~/.bash_aliases
.
Something like this will be appended for each command:
complete -W "SUBCOMMANDS" COMMAND
So, for an alf configuration like this:
g: git
s: status
co: checkout
new: checkout -b
the completion line will look like this:
complete -W "s co new" g
Thoughts?
I will try to implement it.
If you want, you can try the alf script from the add/completion branch
It will append completion commands to the end of the generated bash_aliases script.
You can see it by running
$ alf generate
or save it by running
$ alf save && source ~/.bash_aliases
It adds completion to subcommands. Completion for main commands is automatically enabled by bash
Is this what you meant?
This is great! Exactly what I was asking for.
Great. It is released already in master.
This is a handy utility! Would be even better if this had bash completion like opcode. Any chance of that getting added as a feature?
Thanks for sharing it.