aboutsummaryrefslogtreecommitdiff
path: root/src/background/controllers/completions.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/controllers/completions.js')
-rw-r--r--src/background/controllers/completions.js19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/background/controllers/completions.js b/src/background/controllers/completions.js
index 613940f..c22ba83 100644
--- a/src/background/controllers/completions.js
+++ b/src/background/controllers/completions.js
@@ -13,6 +13,7 @@ export default class ContentMessageController {
if (words.length === 1) {
return this.completionsInteractor.queryConsoleCommand(name);
}
+ let keywords = trimmed.slice(name.length).trimStart();
switch (words[0]) {
case 'o':
case 'open':
@@ -20,22 +21,22 @@ export default class ContentMessageController {
case 'tabopen':
case 'w':
case 'winopen':
- break;
+ return this.completionsInteractor.queryOpen(name);
case 'b':
case 'buffer':
- break;
- case 'bd!':
- case 'bdel!':
- case 'bdelete!':
- case 'bdeletes!':
- break;
+ return this.completionsInteractor.queryBuffer(name, keywords);
case 'bd':
case 'bdel':
case 'bdelete':
case 'bdeletes':
- break;
+ return this.completionsInteractor.queryBdelete(name, keywords);
+ case 'bd!':
+ case 'bdel!':
+ case 'bdelete!':
+ case 'bdeletes!':
+ return this.completionsInteractor.queryBdeleteForce(name, keywords);
case 'set':
- break;
+ return this.completionsInteractor.querySet(name, keywords);
}
return Promise.resolve(Completions.empty());
}