[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.90-60-g2e859f1

Igor Murzov e-mail at date.by
Sun Nov 20 19:49:23 UTC 2011


The following commit has been merged in the master branch:
commit 2e859f1a6cfb7d5628108564b4020780ad112328
Author: Igor Murzov <e-mail at date.by>
Date:   Sun Nov 20 23:42:20 2011 +0300

    Cleanups: Be consistent, use $( foo ) instead of $(foo).
    
    This partially reverts f0283e1c1b64202bb1adb9f44eac6fdfd80edece

diff --git a/completions/fbgs b/completions/fbgs
index 9a24789..93dbe39 100644
--- a/completions/fbgs
+++ b/completions/fbgs
@@ -8,17 +8,17 @@ _fbgs()
     case "$prev" in
         -f)
             local IFS=$'\n'
-            COMPREPLY=( $(compgen -W '$(fc-list 2>/dev/null)' -- "$cur") )
+            COMPREPLY=( $( compgen -W '$( fc-list 2>/dev/null )' -- "$cur" ) )
             return
             ;;
         -m)
-            COMPREPLY=( $(compgen -W '$(sed \
+            COMPREPLY=( $( compgen -W '$( sed \
                 -n "/^mode/{s/^mode \{1,\}\"\([^\"]\{1,\}\)\"/\1/g;p}" \
-                /etc/fb.modes 2> /dev/null)' -- "$cur") )
+                /etc/fb.modes 2> /dev/null )' -- "$cur" ) )
             return
             ;;
         -d)
-            COMPREPLY=( $(compgen -f -d -- "${cur:-/dev/}") )
+            COMPREPLY=( $( compgen -f -d -- "${cur:-/dev/}" ) )
             return
             ;;
         -t|-g|-p)
@@ -28,8 +28,8 @@ _fbgs()
     esac
 
     if [[ "$cur" == -* ]]; then
-        COMPREPLY=( $(compgen -W '-l -xl -xxl -a --fitwidth -d -m -t -g -f -p
-            -h -c' -- "$cur") )
+        COMPREPLY=( $( compgen -W '-l -xl -xxl -a --fitwidth -d -m -t -g -f -p
+            -h -c' -- "$cur" ) )
         [[ $COMPREPLY ]] && return
     fi
 
diff --git a/completions/fbi b/completions/fbi
index c3bf695..9516247 100644
--- a/completions/fbi
+++ b/completions/fbi
@@ -11,22 +11,22 @@ _fbi()
             return
             ;;
         -r|--resolution)
-            COMPREPLY+=( $(compgen -W '{1..5}') )
+            COMPREPLY+=( $( compgen -W '{1..5}' ) )
             return
             ;;
         -f|--font)
             local IFS=$'\n'
-            COMPREPLY=( $(compgen -W '$(fc-list 2> /dev/null)' -- "$cur") )
+            COMPREPLY=( $( compgen -W '$( fc-list 2> /dev/null )' -- "$cur" ) )
             return
             ;;
         -m|--mode)
-            COMPREPLY=( $(compgen -W '$(sed \
+            COMPREPLY=( $( compgen -W '$( sed \
                 -n "/^mode/{s/^mode \{1,\}\"\([^\"]\{1,\}\)\"/\1/g;p}" \
-                /etc/fb.modes 2> /dev/null)' -- "$cur") )
+                /etc/fb.modes 2> /dev/null )' -- "$cur" ) )
             return
             ;;
         -d|--device)
-            COMPREPLY=( $(compgen -f -d -- "${cur:-/dev/}") )
+            COMPREPLY=( $( compgen -f -d -- "${cur:-/dev/}" ) )
             return
             ;;
         --cachemem|--blend|-T|--vt|-s|--scroll|-t|--timeout|-g|--gamma)
@@ -36,12 +36,12 @@ _fbi()
     esac
 
     if [[ "$cur" == -* ]]; then
-        COMPREPLY=( $(compgen -W '--help --version --store --list --text
+        COMPREPLY=( $( compgen -W '--help --version --store --list --text
             --autozoom --{,no}autoup --{,no}autodown --{,no}fitwidth
             --{,no}verbose --{,no}random --{,no}comments --{,no}edit
             --{,no}backup --{,no}preserve --{,no}readahead --cachemem --blend
             --vt --scroll --timeout --{,no}once --resolution --gamma --font
-            --device --mode' -- "$cur") )
+            --device --mode' -- "$cur" ) )
         [[ $COMPREPLY ]] && return
     fi
 
diff --git a/completions/feh b/completions/feh
index f1487bd..0f34f94 100644
--- a/completions/feh
+++ b/completions/feh
@@ -7,11 +7,11 @@ _feh()
 
     case "$prev" in
         -B|--image-bg)
-            COMPREPLY=( $(compgen -W 'default white black' -- "$cur") )
+            COMPREPLY=( $( compgen -W 'default white black' -- "$cur" ) )
             return
             ;;
         --index-dim|--index-name|--index-size)
-            COMPREPLY=( $(compgen -W '0 1' -- "$cur") )
+            COMPREPLY=( $( compgen -W '0 1' -- "$cur" ) )
             return
             ;;
         -f|--filelist|-o|--output|-O|--output-only|-\||--start-at)
@@ -25,12 +25,12 @@ _feh()
         -e|--font|-M|--menu-font|-@|--title-font)
             # expect string like "dejavu.ttf/12"
             if [[ "$cur" == */* ]]; then # expect integer value
-                COMPREPLY=( $(compgen -P "$cur" -W '{0..9}') )
+                COMPREPLY=( $( compgen -P "$cur" -W '{0..9}' ) )
                 compopt -o nospace
                 return
             fi
             local font_path
-            # font_path="$(imlib2-config --prefix 2> /dev/null)/share/imlib2/data/fonts"
+            # font_path="$( imlib2-config --prefix 2> /dev/null )/share/imlib2/data/fonts"
             # COMPREPLY=( $( cd "$font_path" 2> /dev/null; compgen -f \
             #     -X "!*.@([tT][tT][fF])" -S / -- "$cur" ) )
             for (( i=${#words[@]}-1; i>0; i-- )); do
@@ -51,43 +51,43 @@ _feh()
                 if [[ "$theme_name" == '#'* || "$theme_name" == "" ]]; then
                     continue
                 fi
-                COMPREPLY+=( $(compgen -W "$theme_name" -- "$cur") )
+                COMPREPLY+=( $( compgen -W "$theme_name" -- "$cur" ) )
             done < "$conf_path"
             return
             ;;
         -S|--sort)
-            COMPREPLY=( $(compgen -W 'name filename width height pixels size
-                format' -- "$cur") )
+            COMPREPLY=( $( compgen -W 'name filename width height pixels size
+                format' -- "$cur" ) )
             return
             ;;
         -R|--reload|-H|--limit-height|-W|--limit-width|-E|--thumb-height|\
         -y|--thumb-width|-J|--thumb-redraw)
             # expect integer value
-            COMPREPLY+=( $(compgen -W '{0..9}') )
+            COMPREPLY+=( $( compgen -W '{0..9}' ) )
             compopt -o nospace
             return
             ;;
         --zoom)
             # expect integer value or "max", "fill"
-            COMPREPLY=( $(compgen -W 'max fill' -- "$cur") )
+            COMPREPLY=( $( compgen -W 'max fill' -- "$cur" ) )
             if [[ ! $cur || ! $COMPREPLY ]]; then
-                COMPREPLY+=( $(compgen -W '{0..9}') )
+                COMPREPLY+=( $( compgen -W '{0..9}' ) )
                 compopt -o nospace
             fi
             return
             ;;
         -0|--reload-button|-1|--pan-button|-2|--zoom-button|-3|--menu-button|\
         -4|--prev-button|-5|--next-button|-8|--rotate-button|-9|--blur-button)
-            COMPREPLY=( $(compgen -W '{0..9}' -- "$cur") )
+            COMPREPLY=( $( compgen -W '{0..9}' -- "$cur" ) )
             return
             ;;
         -a|--alpha)
-            COMPREPLY=( $(compgen -W '{0..255}' -- "$cur") )
+            COMPREPLY=( $( compgen -W '{0..255}' -- "$cur" ) )
             return
             ;;
         -b|--bg)
             _filedir
-            COMPREPLY+=( $(compgen -W 'trans' -- "$cur") )
+            COMPREPLY+=( $( compgen -W 'trans' -- "$cur" ) )
             return
             ;;
         -g|--geometry)
@@ -95,7 +95,7 @@ _feh()
             if [[ $cur && "$cur" != *x* ]]; then
                 COMPREPLY=( x )
             fi
-            COMPREPLY+=( $(compgen -W "{0..9}") )
+            COMPREPLY+=( $( compgen -W "{0..9}" ) )
             compopt -o nospace
             return
             ;;
@@ -108,7 +108,7 @@ _feh()
     $split && return
 
     if [[ "$cur" == -* ]]; then
-        COMPREPLY=( $(compgen -W '$(_parse_help "$1" --help)' -- "$cur") )
+        COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' -- "$cur" ) )
         [[ $COMPREPLY == *= ]] && compopt -o nospace
         [[ $COMPREPLY ]] && return
     fi
diff --git a/completions/kcov b/completions/kcov
index 690a2a3..21a8eba 100644
--- a/completions/kcov
+++ b/completions/kcov
@@ -11,7 +11,7 @@ _kcov()
             return
             ;;
         --sort-type|-s)
-            COMPREPLY=( $(compgen -W 'filename percentage' -- "$cur") )
+            COMPREPLY=( $( compgen -W 'filename percentage' -- "$cur" ) )
             return
             ;;
         --include-path|--exclude-path)
@@ -28,7 +28,7 @@ _kcov()
     $split && return
 
     if [[ "$cur" == -* ]]; then
-        COMPREPLY=( $(compgen -W '$(_parse_help "$1" --help)' -- "$cur") )
+        COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' -- "$cur" ) )
         [[ $COMPREPLY == *= ]] && compopt -o nospace
         return
     fi
diff --git a/completions/pgrep b/completions/pgrep
index 5ec27ec..87df1a1 100644
--- a/completions/pgrep
+++ b/completions/pgrep
@@ -24,7 +24,7 @@ _pgrep()
     esac
 
     if [[ $cur == -* ]]; then
-        COMPREPLY=( $(compgen -W '$( _parse_usage "$1" )' -- "$cur") )
+        COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
         return
     fi
 
diff --git a/completions/removepkg b/completions/removepkg
index 3c4d12e..287952c 100644
--- a/completions/removepkg
+++ b/completions/removepkg
@@ -5,7 +5,7 @@ _removepkg()
     local cur prev words cword
     _init_completion || return
     if [[ "$cur" == -* ]]; then
-        COMPREPLY=( $(compgen -W '-copy -keep -preserve -warn' -- "$cur") )
+        COMPREPLY=( $( compgen -W '-copy -keep -preserve -warn' -- "$cur" ) )
         return
     fi
 
@@ -15,8 +15,8 @@ _removepkg()
     fi
 
     local root=${ROOT:-/}
-    COMPREPLY=( $(cd "$root/var/log/packages" 2> /dev/null || return 1; \
-        compgen -f -- "$cur") )
+    COMPREPLY=( $( cd "$root/var/log/packages" 2> /dev/null || return 1; \
+        compgen -f -- "$cur" ) )
 } &&
 complete -F _removepkg removepkg
 
diff --git a/completions/rpm2tgz b/completions/rpm2tgz
index 211c3b6..34e54a5 100644
--- a/completions/rpm2tgz
+++ b/completions/rpm2tgz
@@ -6,7 +6,7 @@ _rpm2tgz()
     _init_completion || return
 
     if [[ "$cur" == -* ]]; then
-        COMPREPLY=( $(compgen -W '-s -S -n -r -d -c' -- "$cur") )
+        COMPREPLY=( $( compgen -W '-s -S -n -r -d -c' -- "$cur" ) )
         return
     fi
 
diff --git a/completions/sbopkg b/completions/sbopkg
index 485a13b..0c812fa 100644
--- a/completions/sbopkg
+++ b/completions/sbopkg
@@ -6,14 +6,14 @@ _sbopkg()
     _init_completion || return
 
     if [[ "$cur" == -* ]]; then
-        COMPREPLY=( $(compgen -W '-b -c -d -e -f -g -h -i -k -l -o
-            -P -p -q -R -r -s -u -V -v' -- "$cur") )
+        COMPREPLY=( $( compgen -W '-b -c -d -e -f -g -h -i -k -l -o
+            -P -p -q -R -r -s -u -V -v' -- "$cur" ) )
         return
     fi
 
     case "$prev" in
         -e)
-            COMPREPLY=( $(compgen -W 'ask continue stop' -- "$cur") )
+            COMPREPLY=( $( compgen -W 'ask continue stop' -- "$cur" ) )
             return
             ;;
         -f)
@@ -25,8 +25,8 @@ _sbopkg()
             return
             ;;
         -V)
-            COMPREPLY=( $(compgen -W "? \
-                $(sbopkg -V ? 2>&1 | cut -s -f1)" -- "$cur") )
+            COMPREPLY=( $( compgen -W "? \
+                $( sbopkg -V ? 2>&1 | cut -s -f1 )" -- "$cur" ) )
             return
             ;;
         -i|-b)
@@ -66,9 +66,9 @@ _sbopkg()
     if [[ ! -r $REPO_ROOT/$REPO_NAME/$REPO_BRANCH/SLACKBUILDS.TXT ]]; then
         return
     fi
-    COMPREPLY=( $(sed -ne "/^SLACKBUILD NAME: $cur/{s/^SLACKBUILD NAME: //;p}"\
-        $REPO_ROOT/$REPO_NAME/$REPO_BRANCH/SLACKBUILDS.TXT)
-        $(cd $QUEUEDIR; compgen -f -X "!*.sqf"  -- "$cur") )
+    COMPREPLY=( $( sed -ne "/^SLACKBUILD NAME: $cur/{s/^SLACKBUILD NAME: //;p}"\
+        $REPO_ROOT/$REPO_NAME/$REPO_BRANCH/SLACKBUILDS.TXT )
+        $( cd $QUEUEDIR; compgen -f -X "!*.sqf"  -- "$cur" ) )
 } && complete -F _sbopkg sbopkg
 
 # ex: ts=4 sw=4 et filetype=sh
diff --git a/completions/slackpkg b/completions/slackpkg
index cc409ce..b4223e7 100644
--- a/completions/slackpkg
+++ b/completions/slackpkg
@@ -16,11 +16,11 @@ _slackpkg()
     case "$prev" in
         -delall|-checkmd5|-checkgpg|-checksize|-postinst|-onoff|-download_all|\
         -dialog|-batch|-only_new_dotnew|-use_includes|-spinning)
-            COMPREPLY=( $(compgen -W 'on off' -- "$cur") )
+            COMPREPLY=( $( compgen -W 'on off' -- "$cur" ) )
             return
             ;;
         -default_answer)
-            COMPREPLY=( $(compgen -W 'yes no' -- "$cur") )
+            COMPREPLY=( $( compgen -W 'yes no' -- "$cur" ) )
             return
             ;;
         -dialog_maxargs|-mirror)
@@ -33,10 +33,10 @@ _slackpkg()
 
     if [[ "$cur" == -* ]]; then
         compopt -o nospace
-        COMPREPLY=( $(compgen -W '-delall= -checkmd5= -checkgpg=
+        COMPREPLY=( $( compgen -W '-delall= -checkmd5= -checkgpg=
             -checksize= -postinst= -onoff= -download_all= -dialog=
             -dialog_maxargs= -batch= -only_new_dotnew= -use_includes=
-            -spinning= -default_answer= -mirror=' -- "$cur") )
+            -spinning= -default_answer= -mirror=' -- "$cur" ) )
         return
     fi
 
@@ -63,42 +63,42 @@ _slackpkg()
             ;;
         install-template|remove-template)
             if [[ -e $confdir/templates ]]; then
-                COMPREPLY=( $(cd "$confdir/templates"; \
-                    compgen -f -X "!*.template" -- "$cur") )
+                COMPREPLY=( $( cd "$confdir/templates"; \
+                    compgen -f -X "!*.template" -- "$cur" ) )
                 COMPREPLY=( ${COMPREPLY[@]%.template} )
             fi
             return
             ;;
         remove)
             _filedir
-            COMPREPLY+=( $(compgen -W 'a ap d e f k kde kdei l n t tcl x
-                xap y' -- "$cur") )
-            COMPREPLY+=( $(cd /var/log/packages; compgen -f -- "$cur") )
+            COMPREPLY+=( $( compgen -W 'a ap d e f k kde kdei l n t tcl x
+                xap y' -- "$cur" ) )
+            COMPREPLY+=( $( cd /var/log/packages; compgen -f -- "$cur" ) )
             return
             ;;
         install|reinstall|upgrade|blacklist|download)
             _filedir
-            COMPREPLY+=( $(compgen -W 'a ap d e f k kde kdei l n t tcl x
-                xap y' -- "$cur") )
-            COMPREPLY+=( $(cut -f 6 -d\  "${WORKDIR}/pkglist" 2> /dev/null | \
-                grep "^$cur") )
+            COMPREPLY+=( $( compgen -W 'a ap d e f k kde kdei l n t tcl x
+                xap y' -- "$cur" ) )
+            COMPREPLY+=( $( cut -f 6 -d\  "${WORKDIR}/pkglist" 2> /dev/null | \
+                grep "^$cur" ) )
             return
             ;;
         info)
-            COMPREPLY=( $(cut -f 6 -d\  "${WORKDIR}/pkglist" 2> /dev/null | \
-                grep "^$cur") )
+            COMPREPLY=( $( cut -f 6 -d\  "${WORKDIR}/pkglist" 2> /dev/null | \
+                grep "^$cur" ) )
             return
             ;;
         update)
             # we should complete the same as the next `list` + "gpg"
-            COMPREPLY=( $(compgen -W 'gpg' -- "$cur") )
+            COMPREPLY=( $( compgen -W 'gpg' -- "$cur" ) )
             ;&
         *)
-            COMPREPLY+=( $(compgen -W 'install reinstall upgrade remove
+            COMPREPLY+=( $( compgen -W 'install reinstall upgrade remove
                 blacklist download update install-new upgrade-all
                 clean-system new-config check-updates help generate-template
                 install-template remove-template search file-search info' -- \
-                "$cur") )
+                "$cur" ) )
             return
             ;;
     esac
diff --git a/completions/slapt-get b/completions/slapt-get
index 28e6ee9..02f007e 100644
--- a/completions/slapt-get
+++ b/completions/slapt-get
@@ -17,7 +17,7 @@ _slapt_get()
     esac
 
     if [[ "$cur" == -* ]]; then
-        COMPREPLY=( $(compgen -W '$(_parse_help "$1" --help)' -- "$cur") )
+        COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' -- "$cur" ) )
         [[ $COMPREPLY == *= ]] && compopt -o nospace
         [[ $COMPREPLY ]] && return
     fi
@@ -57,22 +57,22 @@ _slapt_get()
             # slapt-get will fail to search for "^name-version"
             # it can search for names only
             local name=${cur%%-*}
-            COMPREPLY=( $(slapt-get -c $config --search "^$name" 2>/dev/null |\
-                sed -ne "/^$cur/{s/ .*$//;p}") )
+            COMPREPLY=( $( slapt-get -c $config --search "^$name" 2>/dev/null |\
+                sed -ne "/^$cur/{s/ .*$//;p}" ) )
             return
             ;;
         avl) # --install|-i|
-            COMPREPLY=( $(slapt-get -c $config --available 2>/dev/null | \
-                sed -ne "/^$cur/{s/ .*$//;p}") )
+            COMPREPLY=( $( slapt-get -c $config --available 2>/dev/null | \
+                sed -ne "/^$cur/{s/ .*$//;p}" ) )
             return
             ;;
         ins) # --remove|--filelist
-            COMPREPLY=( $(cd /var/log/packages; compgen -f -- "$cur") )
+            COMPREPLY=( $( cd /var/log/packages; compgen -f -- "$cur" ) )
             return
             ;;
         set) # --install-set
-            COMPREPLY=( $(compgen -W 'a ap d e f k kde kdei l n t tcl x
-                xap y' -- "$cur") )
+            COMPREPLY=( $( compgen -W 'a ap d e f k kde kdei l n t tcl x
+                xap y' -- "$cur" ) )
             return
             ;;
     esac
diff --git a/completions/slapt-src b/completions/slapt-src
index acefafe..6234eaa 100644
--- a/completions/slapt-src
+++ b/completions/slapt-src
@@ -17,7 +17,7 @@ _slapt_src()
     esac
 
     if [[ "$cur" == -* ]]; then
-        COMPREPLY=( $(compgen -W '$(_parse_help "$1" --help)' -- "$cur") )
+        COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' -- "$cur" ) )
         [[ $COMPREPLY == *= ]] && compopt -o nospace
         [[ $COMPREPLY ]] && return
     fi
@@ -49,11 +49,11 @@ _slapt_src()
     if [[ "$cur" == *:* ]]; then
         local name=${cur%:*}
         local version=${cur##*:}
-        COMPREPLY=( $(slapt-src --config "$config" --search "^$name" 2> \
-            /dev/null | sed -ne "/^$cur/{s/^$name:\([^ ]*\) .*$/\1/;p}") )
+        COMPREPLY=( $( slapt-src --config "$config" --search "^$name" 2> \
+            /dev/null | sed -ne "/^$cur/{s/^$name:\([^ ]*\) .*$/\1/;p}" ) )
     else
-        COMPREPLY=( $(slapt-src --config "$config" --search "^$cur" 2> \
-            /dev/null | sed -ne "/^$cur/{s/ .*$//;p}") )
+        COMPREPLY=( $( slapt-src --config "$config" --search "^$cur" 2> \
+            /dev/null | sed -ne "/^$cur/{s/ .*$//;p}" ) )
     fi
 } && complete -F _slapt_src slapt-src
 
diff --git a/completions/upgradepkg b/completions/upgradepkg
index b0ebb84..f9fa23a 100644
--- a/completions/upgradepkg
+++ b/completions/upgradepkg
@@ -6,8 +6,8 @@ _upgradepkg()
     _init_completion || return
 
     if [[ "$cur" == -* ]]; then
-        COMPREPLY=( $(compgen -W '--dry-run --install-new --reinstall
-            --verbose' -- "$cur") )
+        COMPREPLY=( $( compgen -W '--dry-run --install-new --reinstall
+            --verbose' -- "$cur" ) )
         return
     fi
 
@@ -16,9 +16,9 @@ _upgradepkg()
         cur="${cur#*%}"
         local nofiles IFS=$'\n'
         compopt -o filenames
-        COMPREPLY=( $(compgen -P "$prev%" -f -X "!*.@(t[bgxl]z)" -- "$cur") )
+        COMPREPLY=( $( compgen -P "$prev%" -f -X "!*.@(t[bgxl]z)" -- "$cur" ) )
         [[ $COMPREPLY ]] || nofiles=1
-        COMPREPLY+=( $(compgen -P "$prev%" -S '/' -d  -- "$cur") )
+        COMPREPLY+=( $( compgen -P "$prev%" -S '/' -d  -- "$cur" ) )
         [[ $nofiles ]] && compopt -o nospace
         return
     fi
diff --git a/completions/wine b/completions/wine
index bb89bf8..c02c97f 100644
--- a/completions/wine
+++ b/completions/wine
@@ -7,7 +7,7 @@ _wine()
 
     if [[ $cword -eq 1 ]]; then
         if [[ "$cur" == -* ]]; then
-            COMPREPLY=( $(compgen -W '--help --version' -- "$cur") )
+            COMPREPLY=( $( compgen -W '--help --version' -- "$cur" ) )
             [[ $COMPREPLY ]] && return
         fi
         _filedir '[eE][xX][eE]?(.[sS][oO])|[cC][oO][mM]|[sS][cC][rR]'
diff --git a/completions/xgamma b/completions/xgamma
index e17d551..c5b8a76 100644
--- a/completions/xgamma
+++ b/completions/xgamma
@@ -7,9 +7,9 @@ _xgamma()
 
     case "$prev" in
         -screen)
-            local screens=$(xrandr --query 2>/dev/null | \
-                sed -n '/^Screen /s|^Screen \{1,\}\(.*\):.*$|\1|p' 2>/dev/null)
-            COMPREPLY=( $(compgen -W "$screens" -- "$cur") )
+            local screens=$( xrandr --query 2>/dev/null | sed -n \
+                '/^Screen /s|^Screen \{1,\}\(.*\):.*$|\1|p' 2>/dev/null )
+            COMPREPLY=( $( compgen -W "$screens" -- "$cur" ) )
             return
             ;;
         -gamma|-rgamma|-ggamma|-bgamma)
@@ -17,7 +17,7 @@ _xgamma()
             if [[ $cur && "$cur" != *.* ]]; then
                 COMPREPLY=( . )
             fi
-            COMPREPLY+=( $(compgen -W "{0..9}") )
+            COMPREPLY+=( $( compgen -W "{0..9}" ) )
             compopt -o nospace
             return
             ;;
@@ -26,15 +26,15 @@ _xgamma()
             if [[ "$cur" == :* && "$cur" != :*.* ]]; then
                 # FIXME: where to get local display numbers?
                 local display=${cur#:}
-                COMPREPLY=( $(compgen -W "${display:-0}.") )
+                COMPREPLY=( $( compgen -W "${display:-0}." ) )
                 compopt -o nospace
             elif [[ "$cur" == :*.* ]]; then
                 # local screen numbers
-                local t screens=$(xrandr --query 2>/dev/null | sed -n \
-                    -e '/^Screen /s|^Screen \{1,\}\(.*\):.*$|\1|p' 2>/dev/null)
+                local t screens=$( xrandr --query 2>/dev/null | sed -ne \
+                    '/^Screen /s|^Screen \{1,\}\(.*\):.*$|\1|p' 2>/dev/null )
                 t="${cur#:}"
-                COMPREPLY=( $(compgen -P "${t%.*}." -W "$screens" -- \
-                    "${cur##*.}") )
+                COMPREPLY=( $( compgen -P "${t%.*}." -W "$screens" -- \
+                    "${cur##*.}" ) )
             elif [[ "$cur" != *:* ]]; then
                 # complete hostnames
                 _known_hosts_real -c "$cur"
@@ -49,7 +49,7 @@ _xgamma()
     esac
 
     if [[ "$cur" == -* ]]; then
-        COMPREPLY=( $(compgen -W '$(_parse_help "$1" -help)' -- "$cur") )
+        COMPREPLY=( $( compgen -W '$( _parse_help "$1" -help )' -- "$cur" ) )
         [[ $COMPREPLY == *= ]] && compopt -o nospace
         [[ $COMPREPLY ]] && return
     fi
diff --git a/completions/xrandr b/completions/xrandr
index 126577e..332be81 100644
--- a/completions/xrandr
+++ b/completions/xrandr
@@ -9,8 +9,8 @@ _xrandr()
 
     case "$prev" in
         --output|--left-of|--right-of|--above|--below|--same-as)
-            local outputs=$(xrandr|awk '/connected/ {print $1}')
-            COMPREPLY=( $(compgen -W "$outputs" -- "$cur") )
+            local outputs=$( xrandr | awk '/connected/ {print $1}' )
+            COMPREPLY=( $( compgen -W "$outputs" -- "$cur" ) )
             return
             ;;
         --mode)
@@ -20,36 +20,36 @@ _xrandr()
                     break
                 fi
             done
-            modes=$(xrandr|sed -e "1,/$output/ d" \
-                -e "/connected/,$ d"|awk '{print $1}')
-            COMPREPLY=( $(compgen -W "$modes" -- "$cur") )
+            modes=$( xrandr | sed -e "1,/$output/ d" \
+                -e "/connected/,$ d" | awk '{print $1}' )
+            COMPREPLY=( $( compgen -W "$modes" -- "$cur" ) )
             return
             ;;
         -o|--orientation)
-            COMPREPLY=( $(compgen -W 'normal inverted left right 0 1 2 3' -- \
-                "$cur") )
+            COMPREPLY=( $( compgen -W 'normal inverted left right 0 1 2 3' -- \
+                "$cur" ) )
             return
             ;;
         --reflect)
-            COMPREPLY=( $(compgen -W 'normal x y xy' -- "$cur") )
+            COMPREPLY=( $( compgen -W 'normal x y xy' -- "$cur" ) )
             return
             ;;
         --rotate)
-            COMPREPLY=( $(compgen -W 'normal inverted left right' -- "$cur") )
+            COMPREPLY=( $( compgen -W 'normal inverted left right' -- "$cur" ) )
             return
             ;;
     esac
 
     case $cur in
         *)
-            COMPREPLY=( $(compgen -W '-display -help --orientation --query
+            COMPREPLY=( $( compgen -W '-display -help --orientation --query
                 --size --rate --version -x -y --screen --verbose --dryrun
                 --q1 --q12 --nograb --prop --properties --fb --fbmm --dpi
                 --output --auto --mode --preferred --pos --rate --refresh
                 --reflect --rotate --left-of --right-of --above --below
                 --same-as --set --scale --transform --off --crtc --panning
                 --gamma --brightness --primary --noprimary --newmode --rmmode
-                --addmode --delmode' -- "$cur") )
+                --addmode --delmode' -- "$cur" ) )
             return
             ;;
     esac

-- 
bash-completion



More information about the Bash-completion-commits mailing list