]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.completion: fix help-lint warning.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 3 Jan 2022 01:53:53 +0000 (17:53 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 3 Jan 2022 01:53:53 +0000 (17:53 -0800)
basis/tools/completion/completion-docs.factor
basis/tools/completion/completion.factor

index fc91a60dfb77cad4007fce9ad735cd753a4336f5..faf9b0d468a6789c8e8f314503c6bd5d7c3f9ebf 100644 (file)
@@ -42,13 +42,8 @@ HELP: complete
 { $description "Ranks how close " { $snippet "short" } " is to " { $snippet "full" } " by edit distance." } ;
 
 HELP: completion
-{ $values { "short" string } { "candidate" "a pair " { $snippet "{ obj full }" } } { "result" "a pair " { $snippet "{ score obj }" } } }
-{ $description "Outputs a pair of two elements:"
-    { $list
-        { "how close " { $snippet "short" } " is to " { $snippet "full" } " by edit distance" }
-        { "the original value of " { $snippet "obj" } }
-    }
-} ;
+{ $values { "short" string } { "candidate" "a pair " { $snippet "{ obj full }" } } { "score" number } }
+{ $description "Outputs a score for matching two elements indicating how close " { $snippet "short" } " is to " { $snippet "full" } " by edit distance" } ;
 
 HELP: completion,
 { $values { "short" string } { "candidate" "a pair " { $snippet "{ obj full }" } } }
index 1968b26d2e4d1edb764d5b1ec43b514a2a8aebaa..bf3faa40f6d3174c05ae4c7c0f322fa5be528801 100644 (file)
@@ -64,7 +64,7 @@ PRIVATE>
         [ <reversed> ] bi@ dupd fuzzy score max
     ] [ 2drop ] if ;
 
-: completion ( short candidate -- score result )
+: completion ( short candidate -- score candidate )
     [ second swap complete ] keep ; inline
 
 : completion, ( short candidate -- )