aboutsummaryrefslogtreecommitdiff
path: root/src/console/components/Console.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/console/components/Console.tsx')
-rw-r--r--src/console/components/Console.tsx12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/console/components/Console.tsx b/src/console/components/Console.tsx
index 0a102a0..7be073e 100644
--- a/src/console/components/Console.tsx
+++ b/src/console/components/Console.tsx
@@ -7,6 +7,7 @@ import Message from './console/Message';
import * as consoleActions from '../../console/actions/console';
import { State as AppState } from '../reducers';
import CommandLineParser, { InputPhase } from "../commandline/CommandLineParser";
+import { Command } from "../../shared/Command";
const COMPLETION_MAX_ITEMS = 33;
@@ -163,7 +164,16 @@ class Console extends React.Component<Props> {
if (phase === InputPhase.OnCommand) {
return this.props.dispatch(consoleActions.getCommandCompletions(text));
} else {
- this.props.dispatch(consoleActions.getCompletions(text));
+ const cmd = this.commandLineParser.parse(text);
+ switch (cmd.command) {
+ case Command.Open:
+ case Command.TabOpen:
+ case Command.WindowOpen:
+ this.props.dispatch(consoleActions.getOpenCompletions(this.props.completionTypes, text, cmd.command, cmd.args));
+ break;
+ default:
+ this.props.dispatch(consoleActions.getCompletions(text));
+ }
}
}
}