diff options
author | Robert Kielty <rob.kielty@gmail.com> | 2018-11-26 19:01:24 +0300 |
---|---|---|
committer | Kat Marchán <kzm@zkat.tech> | 2018-11-26 19:01:24 +0300 |
commit | 15da8269032bf509ade3252978e934f2a61d4499 (patch) | |
tree | bb40ccbd5f6d7d94bde18b95f26bd3b860e59425 /doc | |
parent | 27217dae8adbc577ee9cb323b7cfe9c6b2493aca (diff) |
docs: bash_completion.d dir found in /etc not /usr/local (#72)
I found this page useful for setting up npm command completion. Thank you npm
documentation team.
This suggested changed is based on my system which runs Ubuntu where
the completion directory path for bash is found in
/etc/bash_completion.d and not /usr/local/etc/bash_completion.d
I dug around docs for this in The Bash Manual
https://www.gnu.org/software/bash/manual/bashref.html#Programmable-Completion
and on some an old (sadly retired) Debian Admin Site
https://debian-administration.org/article/317/An_introduction_to_bash_completion_part_2
which seemed supportive of the dir being in /etc but I do not have access
to an OS X machine where I guess bash_completion.d could be in /usr/local/etc
so I left it in.
PR-URL: https://github.com/npm/cli/pull/72
Credit: @RobertKielty
Reviewed-By: @zkat
Diffstat (limited to 'doc')
-rw-r--r-- | doc/cli/npm-completion.md | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/cli/npm-completion.md b/doc/cli/npm-completion.md index cc826a4d7..57fa3bbd3 100644 --- a/doc/cli/npm-completion.md +++ b/doc/cli/npm-completion.md @@ -17,9 +17,10 @@ everywhere: npm completion >> ~/.bashrc npm completion >> ~/.zshrc -You may of course also pipe the output of npm completion to a file -such as `/usr/local/etc/bash_completion.d/npm` if you have a system -that will read that file for you. +You may of course also pipe the output of `npm completion` to a file +such as `/usr/local/etc/bash_completion.d/npm` or +`/etc/bash_completion.d/npm` if you have a system that will read +that file for you. When `COMP_CWORD`, `COMP_LINE`, and `COMP_POINT` are defined in the environment, `npm completion` acts in "plumbing mode", and outputs |