@sap/cds-dk
Version:
Command line client and development toolkit for the SAP Cloud Application Programming Model
29 lines (23 loc) • 869 B
JavaScript
const cds = require('../../../cds');
module.exports = class CompletionTemplate extends require('../../plugin') {
static help() {
return 'shell completion for cds commands'
}
options() {
const completionSetup = require('./completionSetup');
return {
'shell': {
type: 'string',
short: 's',
help: `<optional> Forces completion setup for a given shell and disables auto detection.
Usually the shell is determined automatically and this is only for cases where the automatic
detection fails. Valid values: ${completionSetup.supportedShells.join(', ')}.`
}
}
}
async run() {
const completionSetup = require('./completionSetup');
await completionSetup.setup(true, cds.cli.options);
process.exit(0);
}
}