@@ -5,7 +5,7 @@ import files
55import std/ [os, osproc, parsecfg, streams, strutils]
66
77proc formatForFuzzy (matches: seq [string ]): string =
8- return matches.join (" \n " )
8+ matches.join (" \n " )
99
1010proc getSelectionFromFuzzy (choices: seq [string ], fuzzy: string ): string =
1111 var p = startProcess (fuzzy, options = {poUsePath})
@@ -26,19 +26,14 @@ proc hasWarnedAboutNoFuzzy(fuzzy: string): bool =
2626 warn (" Try an alternative (fzf or fzy) for this command to work." )
2727 return true
2828
29- proc selectFromDir * (fromDir: string , config: Config ): string =
30- let choices = getFilesForDir (fromDir)
31- let fuzzy = getFuzzyProvider (config)
32-
33- if hasWarnedAboutNoFuzzy (fuzzy):
34- return
35-
36- return getSelectionFromFuzzy (choices, fuzzy)
37-
3829proc selectFromChoice * (choices: seq [string ], config: Config ): string =
3930 let fuzzy = getFuzzyProvider (config)
4031
4132 if hasWarnedAboutNoFuzzy (fuzzy):
4233 return
4334
4435 return getSelectionFromFuzzy (choices, fuzzy)
36+
37+ proc selectFromDir * (fromDir: string , config: Config ): string =
38+ let choices = getFilesForDir (fromDir)
39+ return selectFromChoice (choices, config)
0 commit comments