awslabs / aws-shell

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

decrease cases where complete reparsing is required. #134

Closed chronologos closed 7 years ago

chronologos commented 7 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.