summaryrefslogtreecommitdiff
path: root/completions/quota
diff options
context:
space:
mode:
Diffstat (limited to 'completions/quota')
-rw-r--r--completions/quota68
1 files changed, 34 insertions, 34 deletions
diff --git a/completions/quota b/completions/quota
index bf7319bc..f5f9cc82 100644
--- a/completions/quota
+++ b/completions/quota
@@ -5,35 +5,35 @@ _user_or_group()
local i
# complete on groups if -g was given
- for (( i=1; i < cword; i++ )); do
- if [[ "${words[i]}" == -@(g|-group) ]]; then
- COMPREPLY=( $(compgen -g -- "$cur") )
+ for ((i = 1; i < cword; i++)); do
+ if [[ ${words[i]} == -@(g|-group) ]]; then
+ COMPREPLY=($(compgen -g -- "$cur"))
return
fi
done
# otherwise complete on users
- COMPREPLY=( $(compgen -u -- "$cur") )
+ COMPREPLY=($(compgen -u -- "$cur"))
}
_quota_parse_help()
{
local opts=$(_parse_help "$1")
- COMPREPLY=( $(compgen -W '${opts:-$(_parse_usage "$1")}' -- "$cur") )
- [[ $COMPREPLY == *= ]] && compopt -o nospace
+ COMPREPLY=($(compgen -W '${opts:-$(_parse_usage "$1")}' -- "$cur"))
+ [[ ${COMPREPLY-} == *= ]] && compopt -o nospace
}
_quota_formats()
{
- COMPREPLY=( $(compgen -W 'vfsold vfsv0 rpc xfs' -- "$cur") )
+ COMPREPLY=($(compgen -W 'vfsold vfsv0 rpc xfs' -- "$cur"))
}
_filesystems()
{
# Only list filesystems starting with "/", otherwise we also get
#+ "binfmt_misc", "proc", "tmpfs", ...
- COMPREPLY=( $(compgen -W "$(awk '/^\// {print $1}' /etc/mtab)" \
- -- "$cur") )
+ COMPREPLY=($(compgen -W "$(awk '/^\// {print $1}' /etc/mtab)" \
+ -- "$cur"))
}
_quota()
@@ -42,24 +42,24 @@ _quota()
_init_completion -s || return
case $prev in
- -F|--format)
+ -F | --format)
_quota_formats
return
;;
- -h|--help|-V|--version)
+ -h | --help | -V | --version)
return
;;
esac
$split && return
- if [[ "$cur" == -* ]]; then
+ if [[ $cur == -* ]]; then
_quota_parse_help "$1"
else
_user_or_group
fi
} &&
-complete -F _quota -o default quota
+ complete -F _quota -o default quota
_setquota()
{
@@ -67,22 +67,22 @@ _setquota()
_init_completion -s || return
case $prev in
- -F|--format)
+ -F | --format)
_quota_formats
return
;;
- -p|--prototype)
+ -p | --prototype)
_user_or_group
return
;;
- -h|--help|-V|--version)
+ -h | --help | -V | --version)
return
;;
esac
$split && return
- if [[ "$cur" == -* ]]; then
+ if [[ $cur == -* ]]; then
_quota_parse_help "$1"
else
local args
@@ -99,7 +99,7 @@ _setquota()
fi
} &&
-complete -F _setquota -o default setquota
+ complete -F _setquota -o default setquota
_edquota()
{
@@ -107,32 +107,32 @@ _edquota()
_init_completion -s || return
case $prev in
- -F|--format)
+ -F | --format)
_quota_formats
return
;;
- -f|--filesystem)
+ -f | --filesystem)
_filesystems
return
;;
- -p|--prototype)
+ -p | --prototype)
_user_or_group
return
;;
- -h|--help|-V|--version)
+ -h | --help | -V | --version)
return
;;
esac
$split && return
- if [[ "$cur" == -* ]]; then
+ if [[ $cur == -* ]]; then
_quota_parse_help "$1"
else
_user_or_group
fi
} &&
-complete -F _edquota -o default edquota
+ complete -F _edquota -o default edquota
_quotacheck()
{
@@ -140,24 +140,24 @@ _quotacheck()
_init_completion -s || return
case $prev in
- -F|--format)
+ -F | --format)
_quota_formats
return
;;
- -h|--help|-V|--version)
+ -h | --help | -V | --version)
return
;;
esac
$split && return
- if [[ "$cur" == -* ]]; then
+ if [[ $cur == -* ]]; then
_quota_parse_help "$1"
else
_filesystems
fi
} &&
-complete -F _quotacheck -o default quotacheck repquota
+ complete -F _quotacheck -o default quotacheck repquota
_quotaon()
{
@@ -165,27 +165,27 @@ _quotaon()
_init_completion -s || return
case $prev in
- -F|--format)
+ -F | --format)
_quota_formats
return
;;
- -x|--xfs-command)
- COMPREPLY=( $(compgen -W 'delete enforce' -- "$cur") )
+ -x | --xfs-command)
+ COMPREPLY=($(compgen -W 'delete enforce' -- "$cur"))
return
;;
- -h|--help|-V|--version)
+ -h | --help | -V | --version)
return
;;
esac
$split && return
- if [[ "$cur" == -* ]]; then
+ if [[ $cur == -* ]]; then
_quota_parse_help "$1"
else
_filesystems
fi
} &&
-complete -F _quotaon -o default quotaon quotaoff
+ complete -F _quotaon -o default quotaon quotaoff
# ex: filetype=sh