aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-02 21:53:05 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-02 21:53:05 +1300
commit0ec77f392127d87bc2dad567c60fbd31f276a161 (patch)
treec2b32539aa43cc8b7da47d604dce3906177de9c7
parentUpdate glob settings for manual page completion (diff)
downloaddotfiles-0ec77f392127d87bc2dad567c60fbd31f276a161.tar.gz
dotfiles-0ec77f392127d87bc2dad567c60fbd31f276a161.zip
Adjust quoting and termination for man completion
-rw-r--r--bash/bash_completion.d/man.bash6
1 files changed, 3 insertions, 3 deletions
diff --git a/bash/bash_completion.d/man.bash b/bash/bash_completion.d/man.bash
index 4326c48a..7ee301d6 100644
--- a/bash/bash_completion.d/man.bash
+++ b/bash/bash_completion.d/man.bash
@@ -20,7 +20,7 @@ _man() {
# Read completion results from a subshell and add them to the COMPREPLY
# array individually
local ci comp
- while IFS= read -d '' -r comp ; do
+ while IFS= read -d / -r comp ; do
COMPREPLY[ci++]=$comp
done < <(
@@ -77,8 +77,8 @@ _man() {
# Strip section suffixes
pages=("${pages[@]%.[0-9]*}")
- # Print entries, null-delimited
- printf '%s\0' "${pages[@]}"
+ # Print quoted entries, slash-delimited
+ printf '%q/' "${pages[@]}"
)
}
complete -F _man -o bashdefault -o default man