summaryrefslogtreecommitdiffstats
path: root/completions/smbclient
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--completions/smbclient264
1 files changed, 136 insertions, 128 deletions
diff --git a/completions/smbclient b/completions/smbclient
index cea2107..bd2deeb 100644
--- a/completions/smbclient
+++ b/completions/smbclient
@@ -1,242 +1,248 @@
# bash completion for samba -*- shell-script -*-
-_samba_resolve_order()
+_comp_cmd_smbclient__resolve_order()
{
- COMPREPLY=($(compgen -W 'lmhosts host wins bcast' -- "$cur"))
+ _comp_compgen -- -W 'lmhosts host wins bcast'
}
-_samba_domains()
+_comp_cmd_smbclient__domains()
{
- if [[ -n ${COMP_SAMBA_SCAN:-} ]]; then
- COMPREPLY=($(compgen -W '$(smbtree -N -D)' -- "$cur"))
+ if [[ ${BASH_COMPLETION_CMD_SMBTREE_SCAN-${COMP_SAMBA_SCAN-}} ]]; then
+ _comp_compgen_split -- "$(smbtree -N -D)"
fi
}
-_samba_hosts()
+_comp_cmd_smbclient__hosts()
{
- if [[ -n ${COMP_SAMBA_SCAN:-} ]]; then
- COMPREPLY=($(compgen -W "$(
- smbtree -N -S |
- command sed -ne 's/^[[:space:]]*\\\\*\([^[:space:]]*\).*/\1/p'
- )" -- "$cur"))
+ if [[ ${BASH_COMPLETION_CMD_SMBTREE_SCAN-${COMP_SAMBA_SCAN-}} ]]; then
+ _comp_compgen_split -- "$(smbtree -N -S |
+ command sed -ne 's/^[[:space:]]*\\\\*\([^[:space:]]*\).*/\1/p')"
fi
}
-_samba_debuglevel()
+_comp_cmd_smbclient__debuglevel()
{
- COMPREPLY=($(compgen -W '{0..10}' -- "$cur"))
+ _comp_compgen -- -W '{0..10}'
}
-_samba_sockopts()
+_comp_cmd_smbclient__sockopts()
{
- COMPREPLY=($(compgen -W 'SO_KEEPALIVE SO_REUSEADDR SO_BROADCAST
- TCP_NODELAY IPTOS_LOWDELAY IPTOS_THROUGHPUT SO_SNDBUF SO_RCVBUF
- SO_SNDLOWAT SO_RCVLOWAT' -- "$cur"))
+ _comp_compgen -- -W 'SO_KEEPALIVE SO_REUSEADDR SO_BROADCAST TCP_NODELAY
+ IPTOS_LOWDELAY IPTOS_THROUGHPUT SO_SNDBUF SO_RCVBUF SO_SNDLOWAT
+ SO_RCVLOWAT'
}
-_samba_signing()
+_comp_cmd_smbclient__signing()
{
- COMPREPLY=($(compgen -W 'on off required' -- "$cur"))
+ _comp_compgen -- -W 'on off required'
}
-_smbclient()
+_comp_cmd_smbclient()
{
- local cur prev words cword split
- _init_completion -s || return
+ local cur prev words cword was_split comp_args
+ _comp_initialize -s -- "$@" || return
+ local noargopts='!(-*|*[RtsAlDOTWdLSpMIbUniTcm]*)'
+ # shellcheck disable=SC2254
case $prev in
- --name-resolve | -!(-*)R)
- _samba_resolve_order
+ --name-resolve | -${noargopts}R)
+ _comp_cmd_smbclient__resolve_order
return
;;
- -!(-*)t)
- COMPREPLY=($(compgen -W 'SJIS EUC JIS7 JIS8 JUNET HEX CAP' \
- -- "$cur"))
+ -${noargopts}t)
+ _comp_compgen -- -W 'SJIS EUC JIS7 JIS8 JUNET HEX CAP'
return
;;
- --configfile | --authentication-file | -!(-*)[sA])
- _filedir
+ --configfile | --authentication-file | -${noargopts}[sA])
+ _comp_compgen_filedir
return
;;
- --log-basename | --directory | -!(-*)[lD])
- _filedir -d
+ --log-basename | --directory | -${noargopts}[lD])
+ _comp_compgen_filedir -d
return
;;
- --socket-options | -!(-*)O)
- _samba_sockopts
+ --socket-options | -${noargopts}O)
+ _comp_cmd_smbclient__sockopts
return
;;
- -!(-*)T)
- COMPREPLY=($(compgen -W 'c x I X F b g q r N a' -- "$cur"))
+ -${noargopts}T)
+ _comp_compgen -- -W 'c x I X F b g q r N a'
return
;;
- --workgroup | -!(-*)W)
- _samba_domains
+ --workgroup | -${noargopts}W)
+ _comp_cmd_smbclient__domains
return
;;
- --debuglevel | -!(-*)d)
- _samba_debuglevel
+ --debuglevel | -${noargopts}d)
+ _comp_cmd_smbclient__debuglevel
return
;;
- --list | -!(-*)L)
- _samba_hosts
+ --list | -${noargopts}L)
+ _comp_cmd_smbclient__hosts
return
;;
- --signing | -!(-*)S)
- _samba_signing
+ --signing | -${noargopts}S)
+ _comp_cmd_smbclient__signing
return
;;
- --port | --message | --ip-address | --send-buffer | --user | --netbiosname | \
- --scope | --tar | --command | --max-protocol | -!(-*)[pMIbUniTcm])
+ --port | --message | --ip-address | --send-buffer | --user | \
+ --netbiosname | --scope | --tar | --command | --max-protocol | \
+ -${noargopts}[pMIbUniTcm])
return
;;
- --help | --version | -!(-*)[?V])
+ --help | --version | -${noargopts}[?V])
return
;;
esac
- $split && return
+ [[ $was_split ]] && return
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
fi
} &&
- complete -F _smbclient smbclient
+ complete -F _comp_cmd_smbclient smbclient
-_smbget()
+_comp_cmd_smbget()
{
- local cur prev words cword split
- _init_completion -s || return
+ local cur prev words cword was_split comp_args
+ _comp_initialize -s -- "$@" || return
+ local noargopts='!(-*|*[ofdwupb]*)'
+ # shellcheck disable=SC2254
case $prev in
- --outputfile | --rcfile | -!(-*)[of])
- _filedir
+ --outputfile | --rcfile | -${noargopts}[of])
+ _comp_compgen_filedir
return
;;
- --debuglevel | -!(-*)d)
- _samba_debuglevel
+ --debuglevel | -${noargopts}d)
+ _comp_cmd_smbclient__debuglevel
return
;;
- --workgroup | -!(-*)w)
- _samba_domains
+ --workgroup | -${noargopts}w)
+ _comp_cmd_smbclient__domains
return
;;
- --username | --password | --blocksize | -!(-*)[upb])
+ --username | --password | --blocksize | -${noargopts}[upb])
return
;;
esac
- $split && return
+ [[ $was_split ]] && return
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
fi
} &&
- complete -F _smbget smbget
+ complete -F _comp_cmd_smbget smbget
-_smbcacls()
+_comp_cmd_smbcacls()
{
- local cur prev words cword split
- _init_completion -s || return
+ local cur prev words cword was_split comp_args
+ _comp_initialize -s -- "$@" || return
+ local noargopts='!(-*|*[AsldOWDMaSCGniU]*)'
+ # shellcheck disable=SC2254
case $prev in
- --configfile | --authentication-file | -!(-*)[As])
- _filedir
+ --configfile | --authentication-file | -${noargopts}[As])
+ _comp_compgen_filedir
return
;;
- --log-basename | -!(-*)l)
- _filedir -d
+ --log-basename | -${noargopts}l)
+ _comp_compgen_filedir -d
return
;;
- --debuglevel | -!(-*)d)
- _samba_debuglevel
+ --debuglevel | -${noargopts}d)
+ _comp_cmd_smbclient__debuglevel
return
;;
--signing)
- _samba_signing
+ _comp_cmd_smbclient__signing
return
;;
- --socket-options | -!(-*)O)
- _samba_sockopts
+ --socket-options | -${noargopts}O)
+ _comp_cmd_smbclient__sockopts
return
;;
- --workgroup | -!(-*)W)
- _samba_domains
+ --workgroup | -${noargopts}W)
+ _comp_cmd_smbclient__domains
return
;;
- --help | --usage | --delete | --modify | --add | --set | --chown | --chgrp | \
- --netbiosname | --scope | --user | -!(-*)[?DMaSCGniU])
+ --help | --usage | --delete | --modify | --add | --set | --chown | \
+ --chgrp | --netbiosname | --scope | --user | -${noargopts}[?DMaSCGniU])
return
;;
esac
- $split && return
+ [[ $was_split ]] && return
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
fi
} &&
- complete -F _smbcacls smbcacls
+ complete -F _comp_cmd_smbcacls smbcacls
-_smbcquotas()
+_comp_cmd_smbcquotas()
{
- local cur prev words cword split
- _init_completion -s || return
+ local cur prev words cword was_split comp_args
+ _comp_initialize -s -- "$@" || return
+ local noargopts='!(-*|*[sAldUuS]*)'
+ # shellcheck disable=SC2254
case $prev in
- --configfile | --authentication-file | -!(-*)[sA])
- _filedir
+ --configfile | --authentication-file | -${noargopts}[sA])
+ _comp_compgen_filedir
return
;;
- --log-basename | -!(-*)l)
- _filedir -d
+ --log-basename | -${noargopts}l)
+ _comp_compgen_filedir -d
return
;;
- --debuglevel | -!(-*)d)
- _samba_debuglevel
+ --debuglevel | -${noargopts}d)
+ _comp_cmd_smbclient__debuglevel
return
;;
--signing)
- _samba_signing
+ _comp_cmd_smbclient__signing
return
;;
- --help | --usage | --user | --set | -!(-*)[?UuS])
+ --help | --usage | --user | --set | -${noargopts}[?UuS])
return
;;
esac
- $split && return
+ [[ $was_split ]] && return
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
fi
} &&
- complete -F _smbcquotas smbcquotas
+ complete -F _comp_cmd_smbcquotas smbcquotas
-_smbpasswd()
+_comp_cmd_smbpasswd()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
case $prev in
-*r)
- _samba_hosts
+ _comp_cmd_smbclient__hosts
return
;;
-*R)
- _samba_resolve_order
+ _comp_cmd_smbclient__resolve_order
return
;;
-*c)
- _filedir
+ _comp_compgen_filedir
return
;;
-*D)
- _samba_debuglevel
+ _comp_cmd_smbclient__debuglevel
return
;;
-*[Uhw])
@@ -245,31 +251,31 @@ _smbpasswd()
esac
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1" -h)' -- "$cur"))
+ _comp_compgen_help -- -h
fi
} &&
- complete -F _smbpasswd smbpasswd
+ complete -F _comp_cmd_smbpasswd smbpasswd
-_smbtar()
+_comp_cmd_smbtar()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
case $prev in
-*[rt])
- _filedir tar
+ _comp_compgen_filedir tar
return
;;
-*s)
- _samba_hosts
+ _comp_cmd_smbclient__hosts
return
;;
-*l)
- _samba_debuglevel
+ _comp_cmd_smbclient__debuglevel
return
;;
-*N)
- _filedir
+ _comp_compgen_filedir
return
;;
-*[pxbdu])
@@ -278,45 +284,47 @@ _smbtar()
esac
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
fi
} &&
- complete -F _smbtar smbtar
+ complete -F _comp_cmd_smbtar smbtar
-_smbtree()
+_comp_cmd_smbtree()
{
- local cur prev words cword split
- _init_completion -s || return
+ local cur prev words cword was_split comp_args
+ _comp_initialize -s -- "$@" || return
+ local noargopts='!(-*|*[sAldSU]*)'
+ # shellcheck disable=SC2254
case $prev in
- --configfile | --authentication-file | -!(-*)[sA])
- _filedir
+ --configfile | --authentication-file | -${noargopts}[sA])
+ _comp_compgen_filedir
return
;;
- --log-basename | -!(-*)l)
- _filedir -d
+ --log-basename | -${noargopts}l)
+ _comp_compgen_filedir -d
return
;;
- --debuglevel | -!(-*)d)
- _samba_debuglevel
+ --debuglevel | -${noargopts}d)
+ _comp_cmd_smbclient__debuglevel
return
;;
- --signing | -!(-*)S)
- _samba_signing
+ --signing | -${noargopts}S)
+ _comp_cmd_smbclient__signing
return
;;
- --help | --usage | --user | -!(-*)[?U])
+ --help | --usage | --user | -${noargopts}[?U])
return
;;
esac
- $split && return
+ [[ $was_split ]] && return
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
fi
} &&
- complete -F _smbtree smbtree
+ complete -F _comp_cmd_smbtree smbtree
# ex: filetype=sh