diff options
Diffstat (limited to 'modules/ext/wpm.js')
| -rw-r--r-- | modules/ext/wpm.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/ext/wpm.js b/modules/ext/wpm.js index 4dc9c29..314e124 100644 --- a/modules/ext/wpm.js +++ b/modules/ext/wpm.js @@ -1,6 +1,9 @@ class WpmModule { constructor() { this.commands = {}; + this.commandsMeta = { + 'wpm': { argType: 'enum', enumFn: '_listSubcommands' }, + }; this.terminal = null; this.indexUrl = 'https://webx11.duckdns.org/spaces/newos4/packages.json'; this.index = null; @@ -143,6 +146,12 @@ class WpmModule { if (installed) this.terminal.print(`Installed: ${installed.installed}`, 'success'); else this.terminal.print('Not installed. Use: wpm install ' + name, 'info'); } + + // ── Enum helpers for autocomplete ── + + _listSubcommands() { + return ['install', 'list', 'search', 'update', 'remove', 'info']; + } } if (typeof window.webx11 !== 'undefined' && window.webx11) { webx11.moduleManager.registerModule(new WpmModule(), 'https://webx11.duckdns.org/spaces/newos4/modules/ext/wpm.js'); |