2016-01-27 15:43:52 +00:00
|
|
|
---
|
2024-02-23 09:59:02 +00:00
|
|
|
bash-completion-2.12.0/bash_completion | 20 ++++++++++++++------
|
2016-01-27 15:43:52 +00:00
|
|
|
1 file changed, 14 insertions(+), 6 deletions(-)
|
|
|
|
|
2024-02-23 09:59:02 +00:00
|
|
|
--- bash-completion-2.12.0/bash_completion
|
|
|
|
+++ bash-completion-2.12.0/bash_completion 2024-02-23 08:14:51.140697234 +0000
|
|
|
|
@@ -1791,13 +1791,21 @@ _comp_compgen_dollar()
|
2016-01-27 15:43:52 +00:00
|
|
|
[[ "$COMP_LINE" == cd* ]] && s="/"
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
+ \$\(*\))
|
|
|
|
+ ((glob == 0)) && shopt -u extglob
|
|
|
|
+ return 0
|
|
|
|
+ ;;
|
|
|
|
\$\(*)
|
|
|
|
- COMPREPLY=($(compgen -c -P '$(' -S ")$s" -- ${1#??}))
|
|
|
|
- let cmd++
|
|
|
|
+ COMPREPLY=($(compgen -c -P '$(' -S ")$s" -- ${1:2}))
|
|
|
|
+ ((${#COMPREPLY[@]} <= 0)) && let cmd++
|
|
|
|
+ ;;
|
|
|
|
+ \`*\`)
|
|
|
|
+ ((glob == 0)) && shopt -u extglob
|
|
|
|
+ return 0
|
|
|
|
;;
|
|
|
|
\`*)
|
|
|
|
- COMPREPLY=($(compgen -c -P '\`' -S "\`$s" -- ${1#?}))
|
|
|
|
- let cmd++
|
|
|
|
+ COMPREPLY=($(compgen -c -P '\`' -S "\`$s" -- ${1:1}))
|
|
|
|
+ ((${#COMPREPLY[@]} <= 0)) && let cmd++
|
|
|
|
;;
|
|
|
|
\$\{*)
|
|
|
|
COMPREPLY=($(compgen -v -P '${' -S "}$s" -- ${1#??})) ;;
|
2024-02-23 09:59:02 +00:00
|
|
|
@@ -1810,8 +1818,8 @@ _comp_compgen_dollar()
|
2016-01-27 15:43:52 +00:00
|
|
|
|
|
|
|
if ((${#COMPREPLY[@]} > 0)) ; then
|
|
|
|
((${#COMPREPLY[@]} == 1)) && eval COMPREPLY=\(${COMPREPLY[@]}\)
|
|
|
|
- elif ((cmd == 0)); then
|
|
|
|
- eval COMPREPLY=\(${1}\)
|
|
|
|
+ elif ((cmd > 0)); then
|
|
|
|
+ compopt -o default -o bashdefault -o nospace
|
|
|
|
fi
|
|
|
|
|
|
|
|
((glob == 0)) && shopt -u extglob
|