From 10d2740fc97778cf1cba4da30671e6d998a5b258 Mon Sep 17 00:00:00 2001 From: Volodymyr Shatsky Date: Wed, 1 Jun 2016 13:03:23 +0300 Subject: [PATCH] [Fix] [Parser] Require a space between path arguments. --- src/Autocompletion.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Autocompletion.ts b/src/Autocompletion.ts index 712e7bbb9..740b943e1 100644 --- a/src/Autocompletion.ts +++ b/src/Autocompletion.ts @@ -17,7 +17,13 @@ import {environmentVariable} from "./plugins/autocompletion_providers/Environmen export const makeGrammar = (aliases: Dictionary) => { const exec = sequence( choice(mapObject(commandDescriptions, (key, value) => decorate(string(key), compose(description(value), style(styles.executable))))), - optionalContinuation(many1(choice([relativeFilePath, environmentVariable]))) + optionalContinuation(many1(sequence( + choice([ + relativeFilePath, + environmentVariable, + ]), + spacesWithoutSuggestion + ))) ); const sudo = sequence(executable("sudo"), command);