文档中没有提到它 http://nodejs.org/api/readline.html
答案 0 :(得分:1)
通过在readline
模块中阅读此类代码,只需传递[]
即可:
var completions = rv[0],
completeOn = rv[1]; // the text that was completed
if (completions && completions.length) {
// Apply/show completions.
if (completions.length === 1) {
self._insertString(completions[0].slice(completeOn.length));
} else {
self.output.write('\r\n');
当completions
为undefined
时,不会发生任何事情。