aboutsummaryrefslogtreecommitdiff
path: root/bash-completion/rc-service
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2023-07-06 02:25:53 +0200
committerDoug Freed <dwfreed@mtu.edu>2023-07-26 22:41:19 -0500
commitcd5323970163d88fe39443454f8e886504c82da7 (patch)
tree15960d5272362c0750f9cf1ca09a89aa354c87f7 /bash-completion/rc-service
parent92662ddc44f6091e8085fcd4637d13f04e90c5ac (diff)
bash-completion/rc-service: don't set or unset extglob
It breaks bash-completion. It's not necessary to set extglob as patterns in '[[' after '==' are always matched as if extglob were set. Closes: #636 Signed-off-by: Jernej Jakob <jernej.jakob@gmail.com>
Diffstat (limited to 'bash-completion/rc-service')
-rw-r--r--bash-completion/rc-service2
1 files changed, 0 insertions, 2 deletions
diff --git a/bash-completion/rc-service b/bash-completion/rc-service
index 4e9e076e..de936399 100644
--- a/bash-completion/rc-service
+++ b/bash-completion/rc-service
@@ -92,13 +92,11 @@ _rc_service()
return 0
elif [[ ${COMP_CWORD} -eq 2 ]] && [[ ${prev} != -* ]]; then # if second word typed and we didn't type in a function
rc-service --exists "$prev" || return
- shopt -s extglob
while read -r _ line; do
if [[ $line == +([[:alnum:]_]):* ]]; then
opts+="${line%%:*} "
fi
done < <(rc-service "$prev" describe 2>&1)
- shopt -u extglob
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi