summaryrefslogtreecommitdiff
path: root/etc/completions
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-04-02 11:32:38 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-04-02 11:32:38 +0200
commitf0f3c02a3ccde07d3dc79577c7eca41ea3e8e86f (patch)
treed0aaab1de872a30a94555d2da3b501e13e18c217 /etc/completions
parent81ac4a06bff278f07620804b7d4120342b1f6522 (diff)
Replace $var by ${var}
Diffstat (limited to 'etc/completions')
-rw-r--r--etc/completions/__git_files16
-rw-r--r--etc/completions/_cryptsetup4
-rw-r--r--etc/completions/_fbi2
-rw-r--r--etc/completions/_fbsetbg6
-rw-r--r--etc/completions/_fbsetroot14
-rw-r--r--etc/completions/_feh8
-rw-r--r--etc/completions/_gtd-move2
-rw-r--r--etc/completions/_initd6
-rw-r--r--etc/completions/_pkill8
-rw-r--r--etc/completions/_put6
-rw-r--r--etc/completions/_sshfs38
-rw-r--r--etc/completions/_toshset2
12 files changed, 56 insertions, 56 deletions
diff --git a/etc/completions/__git_files b/etc/completions/__git_files
index 44be686..062aefc 100644
--- a/etc/completions/__git_files
+++ b/etc/completions/__git_files
@@ -7,33 +7,33 @@ gitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null)
__git_command_successful || return
ls_opts=("--exclude-per-directory=.gitignore")
-[[ -f "$gitdir/info/exclude" ]] && ls_opts+="--exclude-from=$gitdir/info/exclude"
+[[ -f "${gitdir}/info/exclude" ]] && ls_opts+="--exclude-from=${gitdir}/info/exclude"
-files=(${(ps:\0:)"$(cd $gitdir/..; _call_program files git ls-files -z $ls_opts $opts 2>/dev/null)"})
+files=(${(ps:\0:)"$(cd ${gitdir}/..; _call_program files git ls-files -z ${ls_opts} ${opts} 2>/dev/null)"})
__git_command_successful || return
-if [[ -z $gitdir ]] {
+if [[ -z ${gitdir} ]] {
return 1
}
if [[ ! -d .git ]] {
dirdiff=${PWD#${gitdir%/.git}/}
- for ((i = 1; i <= $#files; i++)) {
+ for ((i = 1; i <= ${#files}; i++)) {
prefix=''
item=(${(s:/:)files[$i]})
self=(${(s:/:)dirdiff})
for ((j = 1; j <= ${#self}; j++)) {
- if [[ $item[$j] == $self[$j] ]] {
+ if [[ ${item[$j]} == ${self[$j]} ]] {
item[$j]=''
} else {
prefix+='../'
}
}
files[$i]=${prefix}
- for j in $item; {
- [[ -n $j ]] && files[$i]+="$j/"
+ for j in ${item}; {
+ [[ -n ${j} ]] && files[$i]+="${j}/"
}
files[$i]=${files[$i]%/}
}
}
-_wanted files expl 'index file' _multi_parts $@ - / files
+_wanted files expl 'index file' _multi_parts ${@} - / files
diff --git a/etc/completions/_cryptsetup b/etc/completions/_cryptsetup
index 5a327b3..9f75ec0 100644
--- a/etc/completions/_cryptsetup
+++ b/etc/completions/_cryptsetup
@@ -19,12 +19,12 @@ function _cryptsetup_mapping {
function _cryptsetup_arguments {
if (( CURRENT == 2 )) {
- case $words[1] in
+ case ${words[1]} in
create|remove|status|resize) _cryptsetup_mapping ;;
luks(Format|Open|AddKey|RemoveKey|KillSlot|DelKey|UUID|Dump)|isLuks) _cryptsetup_device ;;
esac
} elif (( CURRENT == 3 )) {
- case $words[1] in
+ case ${words[1]} in
create) _cryptsetup_device ;;
luksOpen) _cryptsetup_mapping ;;
esac
diff --git a/etc/completions/_fbi b/etc/completions/_fbi
index 8af7fb0..7b0c675 100644
--- a/etc/completions/_fbi
+++ b/etc/completions/_fbi
@@ -36,7 +36,7 @@ arguments=(
'*:file:_files'
)
-_arguments -s $arguments
+_arguments -s ${arguments}
function _font () {
typeset IFS=$'\n'
diff --git a/etc/completions/_fbsetbg b/etc/completions/_fbsetbg
index 93752c4..254e81f 100644
--- a/etc/completions/_fbsetbg
+++ b/etc/completions/_fbsetbg
@@ -28,8 +28,8 @@ file_arguments=(
)
for arg in ${(k)file_arguments}; {
- arguments+=$arg'[set '$file_arguments[$arg]' wallpaper]:file:_files'
- arguments+=${arg:u}'[set '$file_arguments[$arg]' wallpaper (without remembering)]:file:_files'
+ arguments+=${arg}'[set '${file_arguments[$arg]}' wallpaper]:file:_files'
+ arguments+=${arg:u}'[set '${file_arguments[$arg]}' wallpaper (without remembering)]:file:_files'
}
-_arguments -s $arguments
+_arguments -s ${arguments}
diff --git a/etc/completions/_fbsetroot b/etc/completions/_fbsetroot
index bc8903a..ddbc819 100644
--- a/etc/completions/_fbsetroot
+++ b/etc/completions/_fbsetroot
@@ -28,15 +28,15 @@ arguments=(
- help
'-help[print help]'
- solid
- '-solid[set root window to specified color]:color:'"($colors)"
+ '-solid[set root window to specified color]:color:'"(${colors})"
- gradient
- '-gradient[render texture string]:texturestring:'"($texturestrings)"
- '-from[first grodient color]:color:'"($colors)"
- '-to[second gradient color]:color:'"($colors)"
+ '-gradient[render texture string]:texturestring:'"(${texturestrings})"
+ '-from[first grodient color]:color:'"(${colors})"
+ '-to[second gradient color]:color:'"(${colors})"
- mod
'-mod[create modula pattern]:x: :y: '
- '-bg[modula background color]:color:'"($colors)"
- '-fg[modula foreground color]:color:'"($colors)"
+ '-bg[modula background color]:color:'"(${colors})"
+ '-fg[modula foreground color]:color:'"(${colors})"
)
-_arguments -s $arguments
+_arguments -s ${arguments}
diff --git a/etc/completions/_feh b/etc/completions/_feh
index 064762e..97fff26 100644
--- a/etc/completions/_feh
+++ b/etc/completions/_feh
@@ -167,7 +167,7 @@ arguments=(
)
for arg in ${(k)argument_pairs}; {
- arguments+='(--'$arg')-'${argument_pairs[$arg]}${argument_postfix[$arg]}
+ arguments+='(--'${arg}')-'${argument_pairs[$arg]}${argument_postfix[$arg]}
arguments+='(-'${argument_pairs[$arg]}[1]')--'${arg}${argument_postfix[$arg]}
}
@@ -177,9 +177,9 @@ function _feh_theme {
typeset theme IFS=$'\n'
for theme in $(grep "\w" ~/.fehrc | grep -v "^#"); do
tmp=(${(s: :)theme})
- theme=$tmp[1]
+ theme=${tmp[1]}
shift tmp
- themes+=$theme:${(j: :)tmp}
+ themes+=${theme}:${(j: :)tmp}
done
_describe 'theme' themes
fi
@@ -197,4 +197,4 @@ function _feh_background {
'mode:mode:(trans)'
}
-_arguments -s $arguments
+_arguments -s ${arguments}
diff --git a/etc/completions/_gtd-move b/etc/completions/_gtd-move
index e8cc804..7b25732 100644
--- a/etc/completions/_gtd-move
+++ b/etc/completions/_gtd-move
@@ -13,4 +13,4 @@ function _gtd_database {
_path_files -W ~/var/gtd -g '*(.)'
}
-_arguments -s $arguments
+_arguments -s ${arguments}
diff --git a/etc/completions/_initd b/etc/completions/_initd
index 61abd04..f44c0b7 100644
--- a/etc/completions/_initd
+++ b/etc/completions/_initd
@@ -19,9 +19,9 @@ if zstyle -t ':completion:*:*:_initd' all-files; then
fi
for file in /etc/init.d/*(*); {
- read -u0 -k2 bang < $file && [[ $bang == '#!' ]] &&
- [[ -n ${${(j:|:s:|:)${(M)${(f)"$(< $file)"}:#[[:blank:]]#(\'|)(${~action}[[:blank:]]#\|[[:blank:]]#)#${~specific}([[:blank:]]#\|[[:blank:]]#${~action})#(\'|)\)}}//[^-a-z_]} ]] &&
+ read -u0 -k2 bang < ${file} && [[ ${bang} == '#!' ]] &&
+ [[ -n ${${(j:|:s:|:)${(M)${(f)"$(< ${file})"}:#[[:blank:]]#(\'|)(${~action}[[:blank:]]#\|[[:blank:]]#)#${~specific}([[:blank:]]#\|[[:blank:]]#${~action})#(\'|)\)}}//[^-a-z_]} ]] &&
scripts+=${file##*/}
}
-_wanted script expl script compadd $scripts
+_wanted script expl script compadd ${scripts}
diff --git a/etc/completions/_pkill b/etc/completions/_pkill
index 150cf32..8f92fdc 100644
--- a/etc/completions/_pkill
+++ b/etc/completions/_pkill
@@ -27,7 +27,7 @@ arguments=(
':pattern:_named_process'
)
-if [[ $service == 'pgrep' ]] {
+if [[ ${service} == 'pgrep' ]] {
arguments+='-d[set output delimiter]:delimiter'
arguments+='-l[list process name]'
}
@@ -40,12 +40,12 @@ function _named_process {
typeset -a pgrep_user
typeset IFS=$'\n'
if (( EUID )) {
- pgrep_user=(-u $EUID)
+ pgrep_user=(-u ${EUID})
}
_message 'pattern'
_wanted pattern expl 'process name' \
- compadd ${$(pgrep $pgrep_user -l '')#* }
+ compadd ${$(pgrep ${pgrep_user} -l '')#* }
}
-_arguments -s $arguments
+_arguments -s ${arguments}
_signals -p
diff --git a/etc/completions/_put b/etc/completions/_put
index 0dec487..c5b19ca 100644
--- a/etc/completions/_put
+++ b/etc/completions/_put
@@ -3,10 +3,10 @@
typeset -a arguments
typeset net
-for net in $(grep '^hosts_' $ZDIR/functions/put | sed -r 's/^hosts_(\w*)=.*$/\1/'); {
- arguments+="-$net"
+for net in $(grep '^hosts_' ${ZDIR}/functions/put | sed -r 's/^hosts_(\w*)=.*$/\1/'); {
+ arguments+="-${net}"
}
arguments+=':file:_files'
-_arguments -s $arguments
+_arguments -s ${arguments}
diff --git a/etc/completions/_sshfs b/etc/completions/_sshfs
index e4e6aa7..b0adbaa 100644
--- a/etc/completions/_sshfs
+++ b/etc/completions/_sshfs
@@ -12,11 +12,11 @@ _remote_files () {
if zstyle -T ":completion:${curcontext}:files" remote-access; then
zparseopts -D -E -a args p: 1 2 4 6 F:
- if [[ -z $QIPREFIX ]]
+ if [[ -z ${QIPREFIX} ]]
then rempat="${PREFIX%%[^./][^/]#}\*"
else rempat="${(q)PREFIX%%[^./][^/]#}\*"
fi
- remfiles=(${(M)${(f)"$(_call_program files ssh -o BatchMode=yes $args -a -x ${IPREFIX%:} ls -d1FL "$rempat" 2>/dev/null)"}%%[^/]#(|/)})
+ remfiles=(${(M)${(f)"$(_call_program files ssh -o BatchMode=yes ${args} -a -x ${IPREFIX%:} ls -d1FL "${rempat}" 2>/dev/null)"}%%[^/]#(|/)})
compset -P '*/'
compset -S '/*' || suf='remote file'
@@ -26,9 +26,9 @@ _remote_files () {
_tags files
while _tags; do
while _next_label files expl ${suf:-remote directory}; do
- [[ -n $suf ]] && compadd "$@" "$expl[@]" -d remdispf \
+ [[ -n ${suf} ]] && compadd "${@}" "${expl[@]}" -d remdispf \
${(q)remdispf%[*=@|]} && ret=0
- compadd ${suf:+-S/} "$@" "$expl[@]" -d remdispd \
+ compadd ${suf:+-S/} "${@}" "${expl[@]}" -d remdispd \
${(q)remdispd%/} && ret=0
done
(( ret )) || return 0
@@ -53,7 +53,7 @@ _arguments \
':mountpoint:_files -/'
_ssh_users () {
- _combination -s '[:@]' my-accounts users-hosts users "$@"
+ _combination -s '[:@]' my-accounts users-hosts users "${@}"
}
_ssh_hosts () {
@@ -62,40 +62,40 @@ _ssh_hosts () {
integer ind
# If users-hosts matches, we shouldn't complete anything else.
- if [[ "$IPREFIX" == *@ ]]; then
- _combination -s '[:@]' my-accounts users-hosts "users=${IPREFIX/@}" hosts "$@" && return
+ if [[ "${IPREFIX}" == *@ ]]; then
+ _combination -s '[:@]' my-accounts users-hosts "users=${IPREFIX/@}" hosts "${@}" && return
else
_combination -s '[:@]' my-accounts users-hosts \
- ${opt_args[-l]:+"users=${opt_args[-l]:q}"} hosts "$@" && return
+ ${opt_args[-l]:+"users=${opt_args[-l]:q}"} hosts "${@}" && return
fi
if (( ind = ${words[(I)-F]} )); then
config=${~words[ind+1]}
else
- config="$HOME/.ssh/config"
+ config="${HOME}/.ssh/config"
fi
- if [[ -r $config ]]; then
+ if [[ -r ${config} ]]; then
local IFS=$'\t ' key hosts host
while read key hosts; do
- if [[ "$key" == (#i)host ]]; then
+ if [[ "${key}" == (#i)host ]]; then
for host in ${(z)hosts}; do
- case $host in
+ case ${host} in
(*[*?]*) ;;
- (*) config_hosts+=("$host") ;;
+ (*) config_hosts+=("${host}") ;;
esac
done
fi
- done < "$config"
+ done < "${config}"
if (( ${#config_hosts} )); then
_wanted hosts expl 'remote host name' \
- compadd -M 'm:{a-zA-Z}={A-Za-z} r:|.=* r:|=*' "$@" $config_hosts
+ compadd -M 'm:{a-zA-Z}={A-Za-z} r:|.=* r:|=*' "${@}" ${config_hosts}
fi
fi
}
-while [[ -n $state ]]; do
- lstate=$state
+while [[ -n ${state} ]]; do
+ lstate=${state}
state=''
- case $lstate in
+ case ${lstate} in
userhost)
if compset -P '*:'; then
_remote_files ${(kv)~opt_args[(I)-[FP1246]]/-P/-p} && ret=0
@@ -111,7 +111,7 @@ while [[ -n $state ]]; do
fi
_alternative \
'hosts:remote host name:_ssh_hosts -S :' \
- "$tmp[@]"
+ "${tmp[@]}"
fi
;;
esac
diff --git a/etc/completions/_toshset b/etc/completions/_toshset
index 6c48d45..c23d76c 100644
--- a/etc/completions/_toshset
+++ b/etc/completions/_toshset
@@ -45,4 +45,4 @@ arguments=(
'-trmode[toggle display transflective mode]'
)
-_arguments -s $arguments
+_arguments -s ${arguments}