awslabs / aws-shell

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

Remove the AWSCLIModelCompleter attribute from AWSShell. #66

Open donnemartin opened 8 years ago

donnemartin commented 8 years ago

Original discussion: https://github.com/awslabs/aws-shell/pull/45/files#diff-d0a45db8e5ed54b02374996d81926a8cR65

The model completer is also available via the .completer property on shellcomplete.AWSShellCompleter. I think I still have some refactoring to do to get all the various autocompleters more coherent.

My line of thinking was that the ShellCompleter is the only thing the app needs to interact with for anything completion related, and the ShellCompleter can proxy to the model completer and server side completer as needed. I don't think I have the abstractions 100% right yet, but ideally I'd like to be able to just say completer.match_fuzzy and then internally, the ShellCompleter can set the match_fuzzy attribute on the model completer.

We don't have to do this now, but I think it would simplify things by not requiring the AWSShell class to take in an additional param in its init.