Sort commands before autocomplete
This commit is contained in:
parent
6f03cd8bc7
commit
70a1987cf7
1 changed files with 2 additions and 3 deletions
|
|
@ -34,7 +34,7 @@ class AutoComplete
|
|||
return @getCompletion(() => @getCommandCompletion(cmd))
|
||||
|
||||
filterByPrefix: (commands, prefix) ->
|
||||
commands.filter((f) => f.startsWith(prefix))
|
||||
commands.sort().filter((f) => f.startsWith(prefix))
|
||||
|
||||
getCompletion: (completeFunc) ->
|
||||
if @completions.length == 0
|
||||
|
|
@ -51,7 +51,6 @@ class AutoComplete
|
|||
return complete
|
||||
|
||||
getCommandCompletion: (command) ->
|
||||
if @completions.length == 0
|
||||
return @filterByPrefix(@commands, command)
|
||||
|
||||
getFilePathCompletion: (command, filePath) ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue