Update shell completion scripts

This commit is contained in:
timvisee 2019-12-07 15:32:32 +01:00
parent 55e165f315
commit 62f1bce228
No known key found for this signature in database
GPG key ID: B8DB720BC383E172
5 changed files with 38 additions and 3 deletions

View file

@ -1085,6 +1085,8 @@ _arguments "${_arguments_options[@]}" \
'--password=[Protect the file with a password]' \ '--password=[Protect the file with a password]' \
'-d+[The file download limit]' \ '-d+[The file download limit]' \
'--download-limit=[The file download limit]' \ '--download-limit=[The file download limit]' \
'-e+[The file expiry time]' \
'--expiry-time=[The file expiry time]' \
'-h+[The remote host to upload to]' \ '-h+[The remote host to upload to]' \
'--host=[The remote host to upload to]' \ '--host=[The remote host to upload to]' \
'-n+[Rename the file being uploaded]' \ '-n+[Rename the file being uploaded]' \
@ -1136,6 +1138,8 @@ _arguments "${_arguments_options[@]}" \
'--password=[Protect the file with a password]' \ '--password=[Protect the file with a password]' \
'-d+[The file download limit]' \ '-d+[The file download limit]' \
'--download-limit=[The file download limit]' \ '--download-limit=[The file download limit]' \
'-e+[The file expiry time]' \
'--expiry-time=[The file expiry time]' \
'-h+[The remote host to upload to]' \ '-h+[The remote host to upload to]' \
'--host=[The remote host to upload to]' \ '--host=[The remote host to upload to]' \
'-n+[Rename the file being uploaded]' \ '-n+[Rename the file being uploaded]' \
@ -1187,6 +1191,8 @@ _arguments "${_arguments_options[@]}" \
'--password=[Protect the file with a password]' \ '--password=[Protect the file with a password]' \
'-d+[The file download limit]' \ '-d+[The file download limit]' \
'--download-limit=[The file download limit]' \ '--download-limit=[The file download limit]' \
'-e+[The file expiry time]' \
'--expiry-time=[The file expiry time]' \
'-h+[The remote host to upload to]' \ '-h+[The remote host to upload to]' \
'--host=[The remote host to upload to]' \ '--host=[The remote host to upload to]' \
'-n+[Rename the file being uploaded]' \ '-n+[Rename the file being uploaded]' \

View file

@ -371,6 +371,8 @@ Register-ArgumentCompleter -Native -CommandName 'ffsend' -ScriptBlock {
[CompletionResult]::new('--password', 'password', [CompletionResultType]::ParameterName, 'Protect the file with a password') [CompletionResult]::new('--password', 'password', [CompletionResultType]::ParameterName, 'Protect the file with a password')
[CompletionResult]::new('-d', 'd', [CompletionResultType]::ParameterName, 'The file download limit') [CompletionResult]::new('-d', 'd', [CompletionResultType]::ParameterName, 'The file download limit')
[CompletionResult]::new('--download-limit', 'download-limit', [CompletionResultType]::ParameterName, 'The file download limit') [CompletionResult]::new('--download-limit', 'download-limit', [CompletionResultType]::ParameterName, 'The file download limit')
[CompletionResult]::new('-e', 'e', [CompletionResultType]::ParameterName, 'The file expiry time')
[CompletionResult]::new('--expiry-time', 'expiry-time', [CompletionResultType]::ParameterName, 'The file expiry time')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'The remote host to upload to') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'The remote host to upload to')
[CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'The remote host to upload to') [CompletionResult]::new('--host', 'host', [CompletionResultType]::ParameterName, 'The remote host to upload to')
[CompletionResult]::new('-n', 'n', [CompletionResultType]::ParameterName, 'Rename the file being uploaded') [CompletionResult]::new('-n', 'n', [CompletionResultType]::ParameterName, 'Rename the file being uploaded')

View file

@ -2057,7 +2057,7 @@ _ffsend() {
return 0 return 0
;; ;;
ffsend__u) ffsend__u)
opts=" -P -o -a -c -C -S -Q -V -f -I -y -q -v -i -p -d -h -n -t -T -A -H --gen-passphrase --open --archive --copy --copy-cmd --shorten --qrcode --help --version --force --no-interact --yes --quiet --verbose --incognito --password --download-limit --host --name --timeout --transfer-timeout --api --basic-auth --history <FILE>... " opts=" -P -o -a -c -C -S -Q -V -f -I -y -q -v -i -p -d -e -h -n -t -T -A -H --gen-passphrase --open --archive --copy --copy-cmd --shorten --qrcode --help --version --force --no-interact --yes --quiet --verbose --incognito --password --download-limit --expiry-time --host --name --timeout --transfer-timeout --api --basic-auth --history <FILE>... "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0 return 0
@ -2080,6 +2080,14 @@ _ffsend() {
COMPREPLY=($(compgen -f "${cur}")) COMPREPLY=($(compgen -f "${cur}"))
return 0 return 0
;; ;;
--expiry-time)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-e)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--host) --host)
COMPREPLY=($(compgen -f "${cur}")) COMPREPLY=($(compgen -f "${cur}"))
return 0 return 0
@ -2140,7 +2148,7 @@ _ffsend() {
return 0 return 0
;; ;;
ffsend__up) ffsend__up)
opts=" -P -o -a -c -C -S -Q -V -f -I -y -q -v -i -p -d -h -n -t -T -A -H --gen-passphrase --open --archive --copy --copy-cmd --shorten --qrcode --help --version --force --no-interact --yes --quiet --verbose --incognito --password --download-limit --host --name --timeout --transfer-timeout --api --basic-auth --history <FILE>... " opts=" -P -o -a -c -C -S -Q -V -f -I -y -q -v -i -p -d -e -h -n -t -T -A -H --gen-passphrase --open --archive --copy --copy-cmd --shorten --qrcode --help --version --force --no-interact --yes --quiet --verbose --incognito --password --download-limit --expiry-time --host --name --timeout --transfer-timeout --api --basic-auth --history <FILE>... "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0 return 0
@ -2163,6 +2171,14 @@ _ffsend() {
COMPREPLY=($(compgen -f "${cur}")) COMPREPLY=($(compgen -f "${cur}"))
return 0 return 0
;; ;;
--expiry-time)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-e)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--host) --host)
COMPREPLY=($(compgen -f "${cur}")) COMPREPLY=($(compgen -f "${cur}"))
return 0 return 0
@ -2223,7 +2239,7 @@ _ffsend() {
return 0 return 0
;; ;;
ffsend__upload) ffsend__upload)
opts=" -P -o -a -c -C -S -Q -V -f -I -y -q -v -i -p -d -h -n -t -T -A -H --gen-passphrase --open --archive --copy --copy-cmd --shorten --qrcode --help --version --force --no-interact --yes --quiet --verbose --incognito --password --download-limit --host --name --timeout --transfer-timeout --api --basic-auth --history <FILE>... " opts=" -P -o -a -c -C -S -Q -V -f -I -y -q -v -i -p -d -e -h -n -t -T -A -H --gen-passphrase --open --archive --copy --copy-cmd --shorten --qrcode --help --version --force --no-interact --yes --quiet --verbose --incognito --password --download-limit --expiry-time --host --name --timeout --transfer-timeout --api --basic-auth --history <FILE>... "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0 return 0
@ -2246,6 +2262,14 @@ _ffsend() {
COMPREPLY=($(compgen -f "${cur}")) COMPREPLY=($(compgen -f "${cur}"))
return 0 return 0
;; ;;
--expiry-time)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-e)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--host) --host)
COMPREPLY=($(compgen -f "${cur}")) COMPREPLY=($(compgen -f "${cur}"))
return 0 return 0

View file

@ -355,6 +355,8 @@ edit:completion:arg-completer[ffsend] = [@words]{
cand --password 'Protect the file with a password' cand --password 'Protect the file with a password'
cand -d 'The file download limit' cand -d 'The file download limit'
cand --download-limit 'The file download limit' cand --download-limit 'The file download limit'
cand -e 'The file expiry time'
cand --expiry-time 'The file expiry time'
cand -h 'The remote host to upload to' cand -h 'The remote host to upload to'
cand --host 'The remote host to upload to' cand --host 'The remote host to upload to'
cand -n 'Rename the file being uploaded' cand -n 'Rename the file being uploaded'

View file

@ -170,6 +170,7 @@ complete -c ffsend -n "__fish_seen_subcommand_from password" -s v -l verbose -d
complete -c ffsend -n "__fish_seen_subcommand_from password" -s i -l incognito -d 'Don\'t update local history for actions' complete -c ffsend -n "__fish_seen_subcommand_from password" -s i -l incognito -d 'Don\'t update local history for actions'
complete -c ffsend -n "__fish_seen_subcommand_from upload" -s p -l password -d 'Protect the file with a password' complete -c ffsend -n "__fish_seen_subcommand_from upload" -s p -l password -d 'Protect the file with a password'
complete -c ffsend -n "__fish_seen_subcommand_from upload" -s d -l download-limit -d 'The file download limit' complete -c ffsend -n "__fish_seen_subcommand_from upload" -s d -l download-limit -d 'The file download limit'
complete -c ffsend -n "__fish_seen_subcommand_from upload" -s e -l expiry-time -d 'The file expiry time'
complete -c ffsend -n "__fish_seen_subcommand_from upload" -s h -l host -d 'The remote host to upload to' complete -c ffsend -n "__fish_seen_subcommand_from upload" -s h -l host -d 'The remote host to upload to'
complete -c ffsend -n "__fish_seen_subcommand_from upload" -s n -l name -d 'Rename the file being uploaded' complete -c ffsend -n "__fish_seen_subcommand_from upload" -s n -l name -d 'Rename the file being uploaded'
complete -c ffsend -n "__fish_seen_subcommand_from upload" -s t -l timeout -d 'Request timeout (0 to disable)' complete -c ffsend -n "__fish_seen_subcommand_from upload" -s t -l timeout -d 'Request timeout (0 to disable)'