Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit c9d0a34

Browse files
committed
Don't attempt to provide suggestions for CommandWord if it's empty.
1 parent 43644c5 commit c9d0a34

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/shell/Parser.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ class Command extends BranchNode {
107107

108108
class CommandWord extends LeafNode {
109109
async suggestions(context: PreliminarySuggestionContext): Promise<Suggestion[]> {
110+
if (this.value.length === 0) {
111+
return [];
112+
}
113+
110114
const executables = await executablesInPaths(context.environment.path);
111115

112116
return [

0 commit comments

Comments
 (0)