fast word completion for functions names in the shell

This commit is contained in:
Krasimir Angelov
2023-03-02 10:28:00 +01:00
parent adc8a2fa29
commit f7ca8afa81
8 changed files with 87 additions and 2 deletions

View File

@@ -525,7 +525,7 @@ wordCompletion gfenv (left,right) = do
-> Haskeline.completeFilename (left,right)
CmplIdent _ pref
-> case pgfenv gfenv of
(_,Just pgf,_) -> ret (length pref) [Haskeline.simpleCompletion name | name <- functions pgf, isPrefixOf pref name]
(_,Just pgf,_) -> ret (length pref) [Haskeline.simpleCompletion name | name <- functionsByPrefix pgf pref]
_ -> ret (length pref) []
_ -> ret 0 []
where