aws-shell icon indicating copy to clipboard operation
aws-shell copied to clipboard

Stateful commands + small cache and performance changes

Open chronologos opened this issue 9 years ago • 3 comments

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.

chronologos avatar Aug 04 '16 03:08 chronologos

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.

jamesls avatar Aug 04 '16 21:08 jamesls

@jamesls done!

chronologos avatar Aug 05 '16 04:08 chronologos

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

chuckwondo avatar Oct 18 '19 16:10 chuckwondo