cis icon indicating copy to clipboard operation
cis copied to clipboard

Bash competion

Open avaldebe opened this issue 9 years ago • 2 comments
trafficstars

Hi @duncanwp,

I wrote a bash completion script for cis. To use it you jost need to source it as

source cisCompletion.bash
cis [tab] ...

Hope you find this useful enough to add it to the repo.

Cheers, Álvaro.

avaldebe avatar Jun 08 '16 12:06 avaldebe

Hi Alvaro - this is great thanks! I didn't even know you could do this to be honest. My only slight concern is that we have to remember to keep this up to date if we change any of the commands - it's very distinct from the parsing code.

I've also just done a little googling and found this: https://github.com/kislyuk/argcomplete. Have you come across it? It might make things a little easier to manage?

Thanks for the inspiration either way :-)

duncanwp avatar Jun 09 '16 15:06 duncanwp

My only slight concern is that we have to remember to keep this up to date if we change any of the commands - it's very distinct from the parsing code.

I agree. Alas, it requires some knowledge of what the arguments do and which ones expect a file after, so it is not as straightforward as I hoped.

I've also just done a little googling and found this: https://github.com/kislyuk/argcomplete. Have you come across it? It might make things a little easier to manage?

I did not know about it. Will have a look.

avaldebe avatar Jun 11 '16 03:06 avaldebe