awslabs / aws-shell

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

decrease cases where complete reparsing is required. #134

Closed chronologos closed 8 years ago

chronologos commented 8 years ago

In particular, if the user uses to complete a word and the completion is greater than 1 character, _complete_from_full_parse is called, which is pretty slow.

By storing the previous line, we only reparse when the current line does not start with the previous line.