wallix / awless

A Mighty CLI for AWS
http://awless.io/
Apache License 2.0
4.97k stars 263 forks source link

-bash: flaghash[${flagname}]: bad array subscript #211

Open varunchandak opened 6 years ago

varunchandak commented 6 years ago

when I press tab to autocomplete the arguments, I get an array like below:

vrnchndk:Keys varun$ awless -p <PROFILE> list subnets --filter vpc=<VPC_ID> --columns id,vpc --f-bash: flaghash[${flagname}]: bad array subscript

Command that I want:

awless -p <PROFILE> list subnets --filter vpc=<VPC_ID> --columns id,vpc --format csv ... ... 

The same thing occurs for SSH as well:

vrnchndk:Keys varun$ awless -p <PROFILE> ssh --private --d-bash: flaghash[${flagname}]: bad array subscript

Command that I want:

awless -p <PROFILE> ssh --private --disable-strict-host-keychecking <INST_ID>

Looks like the command breaks on hitting the tab on the second argument.

simcap commented 6 years ago

@varunchandak Thanks for reporting.

I have no idea. It is working both for me and @fxaguessy locally on our machine when we are doing multiple flags completion.

Could be related to local machine since bash completion function are a bit mixed together.

At the moment I will not have time to investigate that further. I guess you already googled around.