1 | ;
|
2 |
|
3 | var fs = require('fs');
|
4 | var path = require('path');
|
5 |
|
6 | module.exports = function(name) {
|
7 | if (typeof name !== 'string') throw new Error('Missing completion type');
|
8 | var file = path.join(__dirname, '../completion', name);
|
9 | try {
|
10 | console.log(fs.readFileSync(file, 'utf8'));
|
11 | process.exit(0);
|
12 | } catch (err) {
|
13 | console.log('echo "Specified gulp shell auto-completion rules for \''+name+'\' not found"');
|
14 | process.exit(5);
|
15 | }
|
16 | };
|