summaryrefslogtreecommitdiff
path: root/completions/smbclient
diff options
context:
space:
mode:
Diffstat (limited to 'completions/smbclient')
-rw-r--r--completions/smbclient124
1 files changed, 61 insertions, 63 deletions
diff --git a/completions/smbclient b/completions/smbclient
index 3a5616cd..c896ce42 100644
--- a/completions/smbclient
+++ b/completions/smbclient
@@ -2,40 +2,40 @@
_samba_resolve_order()
{
- COMPREPLY=( $( compgen -W 'lmhosts host wins bcast' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W 'lmhosts host wins bcast' -- "$cur") )
}
_samba_domains()
{
if [[ -n ${COMP_SAMBA_SCAN:-} ]]; then
- COMPREPLY=( $( compgen -W '$( smbtree -N -D )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(smbtree -N -D)' -- "$cur") )
fi
}
_samba_hosts()
{
if [[ -n ${COMP_SAMBA_SCAN:-} ]]; then
- COMPREPLY=( $( compgen -W "$( smbtree -N -S | \
+ COMPREPLY=( $(compgen -W "$(smbtree -N -S | \
command sed -ne 's/^[[:space:]]*\\\\*\([^[:space:]]*\).*/\1/p' \
- )" -- "$cur" ) )
+ )" -- "$cur") )
fi
}
_samba_debuglevel()
{
- COMPREPLY=( $( compgen -W '{0..10}' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '{0..10}' -- "$cur") )
}
_samba_sockopts()
{
- COMPREPLY=( $( compgen -W 'SO_KEEPALIVE SO_REUSEADDR SO_BROADCAST
+ COMPREPLY=( $(compgen -W 'SO_KEEPALIVE SO_REUSEADDR SO_BROADCAST
TCP_NODELAY IPTOS_LOWDELAY IPTOS_THROUGHPUT SO_SNDBUF SO_RCVBUF
- SO_SNDLOWAT SO_RCVLOWAT' -- "$cur" ) )
+ SO_SNDLOWAT SO_RCVLOWAT' -- "$cur") )
}
_samba_signing()
{
- COMPREPLY=( $( compgen -W 'on off required' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W 'on off required' -- "$cur") )
}
_smbclient()
@@ -44,54 +44,52 @@ _smbclient()
_init_completion -s || return
case $prev in
- -R|--name-resolve)
+ --name-resolve|-!(-*)R)
_samba_resolve_order
return
;;
- -t)
- COMPREPLY=( $( compgen -W 'SJIS EUC JIS7 JIS8 JUNET HEX CAP' \
- -- "$cur" ) )
+ -!(-*)t)
+ COMPREPLY=( $(compgen -W 'SJIS EUC JIS7 JIS8 JUNET HEX CAP' \
+ -- "$cur") )
return
;;
- -s|--configfile|-A|--authentication-file)
+ --configfile|--authentication-file|-!(-*)[sA])
_filedir
return
;;
- -l|--log-basename|-D|--directory)
+ --log-basename|--directory|-!(-*)[lD])
_filedir -d
return
;;
- -O|--socket-options)
+ --socket-options|-!(-*)O)
_samba_sockopts
return
;;
- -T)
- COMPREPLY=( $( compgen -W 'c x I X F b g q r N a' -- "$cur" ) )
+ -!(-*)T)
+ COMPREPLY=( $(compgen -W 'c x I X F b g q r N a' -- "$cur") )
return
;;
- -W|--workgroup)
+ --workgroup|-!(-*)W)
_samba_domains
return
;;
- -d|--debuglevel)
+ --debuglevel|-!(-*)d)
_samba_debuglevel
return
;;
- -L|--list)
+ --list|-!(-*)L)
_samba_hosts
return
;;
- -S|--signing)
+ --signing|-!(-*)S)
_samba_signing
return
;;
- -p|--port|-M|--message|-I|--ip-address|-b|--send-buffer|-U|--user|-n|\
- --netbiosname|-i|--scope|-T|--tar|-c|--command|-m|--max-protocol)
- # argument required but no completions available
+ --port|--message|--ip-address|--send-buffer|--user|--netbiosname|\
+ --scope|--tar|--command|--max-protocol|-!(-*)[pMIbUniTcm])
return
;;
- -\?|--help|-V|--version)
- # all other arguments are noop with these
+ --help|--version|-!(-*)[?V])
return
;;
esac
@@ -99,7 +97,7 @@ _smbclient()
$split && return
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
[[ $COMPREPLY == *= ]] && compopt -o nospace
fi
} &&
@@ -111,19 +109,19 @@ _smbget()
_init_completion -s || return
case $prev in
- -o|--outputfile|-f|--rcfile)
+ --outputfile|--rcfile|-!(-*)[of])
_filedir
return
;;
- -d|--debuglevel)
+ --debuglevel|-!(-*)d)
_samba_debuglevel
return
;;
- -w|--workgroup)
+ --workgroup|-!(-*)w)
_samba_domains
return
;;
- -u|--username|-p|--password|-b|--blocksize)
+ --username|--password|--blocksize|-!(-*)[upb])
return
;;
esac
@@ -131,7 +129,7 @@ _smbget()
$split && return
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
[[ $COMPREPLY == *= ]] && compopt -o nospace
fi
} &&
@@ -143,15 +141,15 @@ _smbcacls()
_init_completion -s || return
case $prev in
- -s|--configfile|-A|--authentication-file)
+ --configfile|--authentication-file|-!(-*)[As])
_filedir
return
;;
- -l|--log-basename)
+ --log-basename|-!(-*)l)
_filedir -d
return
;;
- -d|--debuglevel)
+ --debuglevel|-!(-*)d)
_samba_debuglevel
return
;;
@@ -159,16 +157,16 @@ _smbcacls()
_samba_signing
return
;;
- -O|--socket-options)
+ --socket-options|-!(-*)O)
_samba_sockopts
return
;;
- -W|--workgroup)
+ --workgroup|-!(-*)W)
_samba_domains
return
;;
- -\?|--help|--usage|-D|--delete|-M|--modify|-a|--add|-S|--set|-C|\
- --chown|-G|--chgrp|-n|--netbiosname|-i|--scope|-U|--user)
+ --help|--usage|--delete|--modify|--add|--set|--chown|--chgrp|\
+ --netbiosname|--scope|--user|-!(-*)[?DMaSCGniU])
return
;;
esac
@@ -176,7 +174,7 @@ _smbcacls()
$split && return
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
[[ $COMPREPLY == *= ]] && compopt -o nospace
fi
} &&
@@ -188,15 +186,15 @@ _smbcquotas()
_init_completion -s || return
case $prev in
- -s|--configfile|-A|--authentication-file)
+ --configfile|--authentication-file|-!(-*)[sA])
_filedir
return
;;
- -l|--log-basename)
+ --log-basename|-!(-*)l)
_filedir -d
return
;;
- -d|--debuglevel)
+ --debuglevel|-!(-*)d)
_samba_debuglevel
return
;;
@@ -204,7 +202,7 @@ _smbcquotas()
_samba_signing
return
;;
- -\?|--help|--usage|-U|-u|--user|-S|--set)
+ --help|--usage|--user|--set|-!(-*)[?UuS])
return
;;
esac
@@ -212,7 +210,7 @@ _smbcquotas()
$split && return
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
[[ $COMPREPLY == *= ]] && compopt -o nospace
fi
} &&
@@ -224,29 +222,29 @@ _smbpasswd()
_init_completion || return
case $prev in
- -r)
+ -*r)
_samba_hosts
return
;;
- -R)
+ -*R)
_samba_resolve_order
return
;;
- -c)
+ -*c)
_filedir
return
;;
- -D)
+ -*D)
_samba_debuglevel
return
;;
- -U|-h|-w)
+ -*[Uhw])
return
;;
esac
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" -h )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_parse_help "$1" -h)' -- "$cur") )
fi
} &&
complete -F _smbpasswd smbpasswd
@@ -257,29 +255,29 @@ _smbtar()
_init_completion || return
case $prev in
- -r|-t)
+ -*[rt])
_filedir tar
return
;;
- -s)
+ -*s)
_samba_hosts
return
;;
- -l)
+ -*l)
_samba_debuglevel
return
;;
- -N)
+ -*N)
_filedir
return
;;
- -p|-x|-b|-d|-u)
+ -*[pxbdu])
return
;;
esac
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
fi
} &&
complete -F _smbtar smbtar
@@ -290,23 +288,23 @@ _smbtree()
_init_completion -s || return
case $prev in
- -s|--configfile|-A|--authentication-file)
+ --configfile|--authentication-file|-!(-*)[sA])
_filedir
return
;;
- -l|--log-basename)
+ --log-basename|-!(-*)l)
_filedir -d
return
;;
- -d|--debuglevel)
+ --debuglevel|-!(-*)d)
_samba_debuglevel
return
;;
- -S|--signing)
+ --signing|-!(-*)S)
_samba_signing
return
;;
- -\?|--help|--usage|-U|--user)
+ --help|--usage|--user|-!(-*)[?U])
return
;;
esac
@@ -314,7 +312,7 @@ _smbtree()
$split && return
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
[[ $COMPREPLY == *= ]] && compopt -o nospace
fi
} &&