aboutsummaryrefslogtreecommitdiff
path: root/src/actions/background.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-09-10 09:20:54 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-09-10 11:13:05 +0900
commit3c67cc0a002aded07e88ea25acc881ff080d1ae4 (patch)
treeed958c552d1b901d6dd104e73c579bb9c523779d /src/actions/background.js
parent7e35d11f659029febd738c83b19ab4b8a8b69642 (diff)
completion as action/reducer
Diffstat (limited to 'src/actions/background.js')
-rw-r--r--src/actions/background.js11
1 files changed, 11 insertions, 0 deletions
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
+ };
+}