diff --git a/src/node_options.cc b/src/node_options.cc index fb94dd661cae31..fb730975761b32 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -831,7 +831,8 @@ std::string GetBashCompletion() { " return 0\n" " fi\n" "}\n" - "complete -F _node_complete node node_g"; + "complete -o filenames -o nospace -o bashdefault " + "-F _node_complete node node_g"; return out.str(); } diff --git a/test/parallel/test-bash-completion.js b/test/parallel/test-bash-completion.js index 4492c2f85c470f..c0b284153a7058 100644 --- a/test/parallel/test-bash-completion.js +++ b/test/parallel/test-bash-completion.js @@ -24,7 +24,8 @@ const suffix = `' -- "\${cur_word}") ) return 0 fi } -complete -F _node_complete node node_g`.replace(/\r/g, ''); +complete -o filenames -o nospace -o bashdefault -F _node_complete node node_g` + .replace(/\r/g, ''); assert.ok( output.includes(prefix),