From 2e859f1a6cfb7d5628108564b4020780ad112328 Mon Sep 17 00:00:00 2001 From: Igor Murzov Date: Sun, 20 Nov 2011 23:42:20 +0300 Subject: [PATCH] Cleanups: Be consistent, use $( foo ) instead of $(foo). This partially reverts f0283e1c1b64202bb1adb9f44eac6fdfd80edece --- completions/fbgs | 12 ++++++------ completions/fbi | 14 +++++++------- completions/feh | 30 +++++++++++++++--------------- completions/kcov | 4 ++-- completions/pgrep | 2 +- completions/removepkg | 6 +++--- completions/rpm2tgz | 2 +- completions/sbopkg | 16 ++++++++-------- completions/slackpkg | 36 ++++++++++++++++++------------------ completions/slapt-get | 16 ++++++++-------- completions/slapt-src | 10 +++++----- completions/upgradepkg | 8 ++++---- completions/wine | 2 +- completions/xgamma | 20 ++++++++++---------- completions/xrandr | 22 +++++++++++----------- 15 files changed, 100 insertions(+), 100 deletions(-) diff --git a/completions/fbgs b/completions/fbgs index 9a247898..93dbe392 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 c3bf6957..9516247b 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 f1487bd8..0f34f94b 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 690a2a32..21a8eba9 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 5ec27ec2..87df1a1f 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 3c4d12e8..287952cb 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 211c3b61..34e54a5a 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 485a13be..0c812faa 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 cc409ce3..b4223e71 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 28e6ee91..02f007ec 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 acefafe0..6234eaa8 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 b0ebb84b..f9fa23ab 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 bb89bf80..c02c97f0 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 e17d5515..c5b8a76b 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 126577eb..332be812 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