diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2020-06-05 15:17:13 +0300 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2020-06-08 14:56:17 +0300 |
commit | 813368c0371977b58f7781734c66b564fe9f92b4 (patch) | |
tree | 47b3a7d2a24b08afbbbf540c40e8523568e94a96 /src/node_options.cc | |
parent | 7f8e977ee04f9f67b3705b329b815825fad7116e (diff) |
src: add "missing" bash completion options
Currently, when using the bash completions for node the normal
completions for filenames directories do not work. For example, after
finding a node completion and then wanting to use tab completion
for a filename in the test directory, it is only possible to get the
name of the test directory completed, followed by a space. What is
expected is to be able to continue with tab completion for directories.
This commit adds options to the complete command to enable default bash
completions.
PR-URL: https://github.com/nodejs/node/pull/33744
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'src/node_options.cc')
-rw-r--r-- | src/node_options.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_options.cc b/src/node_options.cc index fb94dd661ca..fb730975761 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(); } |