Fix completion for upper case strings

db4
Slava Pestov 2008-01-26 23:46:35 -04:00
parent 27701acaaf
commit 30eae6b77a
1 changed files with 3 additions and 2 deletions

5
extra/tools/completion/completion.factor Normal file → Executable file
View File

@ -60,13 +60,14 @@ vectors words assocs combinators sorting ;
dupd fuzzy score max ;
: completion ( short candidate -- result )
[ second swap complete ] keep first 2array ;
[ second >lower swap complete ] keep first 2array ;
: completions ( short candidates -- seq )
over empty? [
nip [ first ] map
] [
>r >lower r> [ completion ] with map rank-completions
>r >lower r> [ completion ] with map
rank-completions
] if ;
: string-completions ( short strs -- seq )