5 * Copyright (c) 2016 Tyler Kellen, contributors
6 * Licensed under the MIT license.
7 * https://github.com/gruntjs/grunt-init/blob/master/LICENSE-MIT
13 var fs = require('fs');
14 var path = require('path');
16 exports.print = function(name) {
18 var filepath = path.join(__dirname, '../completion', name);
21 // Attempt to read shell completion file.
22 output = String(fs.readFileSync(filepath));
25 output = 'echo "Specified grunt shell auto-completion rules ';
26 if (name && name !== 'true') {
27 output += 'for \'' + name + '\' ';
29 output += 'not found."';