From 3c67cc0a002aded07e88ea25acc881ff080d1ae4 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 10 Sep 2017 09:20:54 +0900 Subject: completion as action/reducer --- src/actions/background.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/actions/background.js (limited to 'src/actions/background.js') diff --git a/src/actions/background.js b/src/actions/background.js new file mode 100644 index 0000000..40b901b --- /dev/null +++ b/src/actions/background.js @@ -0,0 +1,11 @@ +import actions from '../actions'; + +export function requestCompletions(line) { + let command = line.split(' ', 1)[0]; + let keywords = line.replace(command + ' ', ''); + return { + type: actions.BACKGROUND_REQUEST_COMPLETIONS, + command, + keywords + }; +} -- cgit v1.2.3