Prefix for aliases/functions?
wlonkly opened this issue · comments
I've just discovered bash-my-aws, and I love the approach and how easy it is to work with. One challenge I've had while discovering it is knowing what commands are available!
I updated my own copy of .bash-my-aws/aliases
to add an bma-
prefix onto every alias, which means I can use bash command completion to go bma-[tab]
and get a list of 'em all. I was thinking it might be useful to make arbitrary alias prefixes a feature.
The idea is that source .bash-my-aws/aliases
would work as now, and source .bash-my-aws/aliases bma-
would get you bma-instances
, bma-asgs
, etc.
The same would go for bash_completion.sh. (Of course, you'd have to provide bash_completion.sh and aliases the same prefix.)
Thoughts? Would this be welcome? It would be a tiny build script tweak, I figure, plus docs.
Thanks for the kind words, I'm glad you like it too.
When I type bma-[tab]
I get a list of all the commands. It's a neat feature @ninth-dev included when he worked on the aliases (to ensure it all works for people who use zsh).
$ bma
Display all 159 possibilities? (y or n)
Could you check whether this works for you?
There's also a documentation site I wrote over the Christmas holidays which might be helpful:
https://bash-my-aws.org/command-reference/
If you're interested in contributing, perhaps you could create a small PR that inserts a suggestion to use bma-[tab]
to list top level commands?
Ah, I was relying on command/alias completion and not argument completion! That totally meets my needs. I'll make that doc change.