Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stateful commands + small cache and performance changes #136

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

chronologos
Copy link

@chronologos chronologos commented Aug 4, 2016

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 chronologos changed the title cache arguments and decrease frequency of _complete_from_full_parse stateful commands + cache arguments and decrease frequency of _complete_from_full_parse Aug 4, 2016
@chronologos chronologos changed the title stateful commands + cache arguments and decrease frequency of _complete_from_full_parse Stateful commands + small cache and performance changes Aug 4, 2016
@jamesls
Copy link
Member

jamesls commented Aug 4, 2016

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: #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 chronologos force-pushed the master branch 2 times, most recently from 8988b7c to 89b1562 Compare August 5, 2016 04:30
@chronologos
Copy link
Author

@jamesls done!

@chronologos chronologos force-pushed the master branch 3 times, most recently from 2dab240 to b688ec0 Compare August 5, 2016 05:13
@chuckwondo
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants