awslabs / aws-shell

An integrated shell for working with the AWS CLI.
Apache License 2.0
7.15k stars 770 forks source link

Stateful commands + small cache and performance changes #136

Open chronologos opened 7 years ago

chronologos commented 7 years ago

Stateful Commands

@ can be used to add a context to the prompt. e.g. @ec2 will implicitly prefix all commands with ec2. exit will remove the most recently added context. See issue.

Cache and Performance

It used to be that every time the user did a tab completion, the autocompleter would have to do a full parse of the entire line. I made some changes on the condition for full parses such that only tab completions with arguments do a full parse.

Also, all_args are cached while there is no change in context.

jamesls commented 7 years ago

Thanks for the pull request. Quick note on the tests. Looks like they're failing due to a recent change in prompt toolkit. There's a fix out for this: https://github.com/awslabs/aws-shell/pull/137

Once that's merged, you would mind rebasing against master so you can pull in that change? That should fix the failing tests.

chronologos commented 7 years ago

@jamesls done!

chuckwondo commented 4 years ago

I would love for this to be merged and released. Any reason this hasn't been merged?