Make __fish_is_nth_token and __fish_nth_token private again

Their names are not perfect, so let's keep them as internal functions,
until we figure out how/if we want to expose this.

This reverts 0445126c2 (Undunder __fish_is_nth_token, 2021-06-29) (but I
did it without "git revert").

Closes #8008
This commit is contained in:
Johannes Altmanninger
2022-02-09 09:46:07 +01:00
parent a7102f179b
commit 47b0d0c293
36 changed files with 171 additions and 175 deletions

View File

@@ -13,49 +13,49 @@ complete -c s3cmd -f -n __s3cmd_is_valid_remote_path -a "(s3cmd ls (commandline
complete -c s3cmd -f -n __s3cmd_is_remote_path
# Suppress file completions for initial command
complete -c s3cmd -n "fish_is_nth_token 1" -f
complete -c s3cmd -n "__fish_is_nth_token 1" -f
# Available commands
complete -c s3cmd -n "fish_is_nth_token 1" -a mb -d 'Make bucket'
complete -c s3cmd -n "fish_is_nth_token 1" -a rb -d 'Remove bucket'
complete -c s3cmd -n "fish_is_nth_token 1" -a ls -d 'List objects or buckets'
complete -c s3cmd -n "fish_is_nth_token 1" -a la -d 'List all object in all buckets'
complete -c s3cmd -n "fish_is_nth_token 1" -a put -d 'Put file into bucket'
complete -c s3cmd -n "fish_is_nth_token 1" -a get -d 'Get file from bucket'
complete -c s3cmd -n "fish_is_nth_token 1" -a del -d 'Delete file from bucket'
complete -c s3cmd -n "fish_is_nth_token 1" -a rm -d 'Delete file from bucket (alias for del)'
complete -c s3cmd -n "fish_is_nth_token 1" -a restore -d 'Restore file from Glacier storage'
complete -c s3cmd -n "fish_is_nth_token 1" -a sync -d 'Synchronize a directory tree to S3'
complete -c s3cmd -n "fish_is_nth_token 1" -a du -d 'Disk usage by buckets'
complete -c s3cmd -n "fish_is_nth_token 1" -a info -d 'Get various information about Buckets or Files'
complete -c s3cmd -n "fish_is_nth_token 1" -a cp -d 'Copy object'
complete -c s3cmd -n "fish_is_nth_token 1" -a modify -d 'Modify object metadata'
complete -c s3cmd -n "fish_is_nth_token 1" -a mv -d 'Move object'
complete -c s3cmd -n "fish_is_nth_token 1" -a setacl -d 'Modify Access control list for Bucket or Files'
complete -c s3cmd -n "fish_is_nth_token 1" -a setpolicy -d 'Modify Bucket Policy'
complete -c s3cmd -n "fish_is_nth_token 1" -a delpolicy -d 'Delete Bucket Policy'
complete -c s3cmd -n "fish_is_nth_token 1" -a setcors -d 'Modify Bucket CORS'
complete -c s3cmd -n "fish_is_nth_token 1" -a delcors -d 'Delete Bucket CORS'
complete -c s3cmd -n "fish_is_nth_token 1" -a payer -d 'Modify Bucket Requester Pays policy'
complete -c s3cmd -n "fish_is_nth_token 1" -a multipart -d 'Show multipart uploads'
complete -c s3cmd -n "fish_is_nth_token 1" -a abortmp -d 'Abort a multipart upload'
complete -c s3cmd -n "fish_is_nth_token 1" -a listmp -d 'List parts of a multipart upload'
complete -c s3cmd -n "fish_is_nth_token 1" -a accesslog -d 'Enable/disable bucket access logging'
complete -c s3cmd -n "fish_is_nth_token 1" -a sign -d 'Sign arbitrary string using the secret key'
complete -c s3cmd -n "fish_is_nth_token 1" -a signurl -d 'Sign an S3 URL to provide limited public access with expiry'
complete -c s3cmd -n "fish_is_nth_token 1" -a fixbucket -d 'Fix invalid file names in a bucket'
complete -c s3cmd -n "fish_is_nth_token 1" -a ws-create -d 'Create Website from bucket'
complete -c s3cmd -n "fish_is_nth_token 1" -a ws-delete -d 'Delete Website'
complete -c s3cmd -n "fish_is_nth_token 1" -a ws-info -d 'Info about Website'
complete -c s3cmd -n "fish_is_nth_token 1" -a expire -d 'Set or delete expiration rule for the bucket'
complete -c s3cmd -n "fish_is_nth_token 1" -a setlifecycle -d 'Upload a lifecycle policy for the bucket'
complete -c s3cmd -n "fish_is_nth_token 1" -a dellifecycle -d 'Remove a lifecycle policy for the bucket'
complete -c s3cmd -n "fish_is_nth_token 1" -a cflist -d 'List CloudFront distribution points'
complete -c s3cmd -n "fish_is_nth_token 1" -a cfinfo -d 'Display CloudFront distribution point parameters'
complete -c s3cmd -n "fish_is_nth_token 1" -a cfcreate -d 'Create CloudFront distribution point'
complete -c s3cmd -n "fish_is_nth_token 1" -a cfdelete -d 'Delete CloudFront distribution point'
complete -c s3cmd -n "fish_is_nth_token 1" -a cfmodify -d 'Change CloudFront distribution point parameters'
complete -c s3cmd -n "fish_is_nth_token 1" -a cfinvalinfo -d 'Display CloudFront invalidation request(s) status'
complete -c s3cmd -n "__fish_is_nth_token 1" -a mb -d 'Make bucket'
complete -c s3cmd -n "__fish_is_nth_token 1" -a rb -d 'Remove bucket'
complete -c s3cmd -n "__fish_is_nth_token 1" -a ls -d 'List objects or buckets'
complete -c s3cmd -n "__fish_is_nth_token 1" -a la -d 'List all object in all buckets'
complete -c s3cmd -n "__fish_is_nth_token 1" -a put -d 'Put file into bucket'
complete -c s3cmd -n "__fish_is_nth_token 1" -a get -d 'Get file from bucket'
complete -c s3cmd -n "__fish_is_nth_token 1" -a del -d 'Delete file from bucket'
complete -c s3cmd -n "__fish_is_nth_token 1" -a rm -d 'Delete file from bucket (alias for del)'
complete -c s3cmd -n "__fish_is_nth_token 1" -a restore -d 'Restore file from Glacier storage'
complete -c s3cmd -n "__fish_is_nth_token 1" -a sync -d 'Synchronize a directory tree to S3'
complete -c s3cmd -n "__fish_is_nth_token 1" -a du -d 'Disk usage by buckets'
complete -c s3cmd -n "__fish_is_nth_token 1" -a info -d 'Get various information about Buckets or Files'
complete -c s3cmd -n "__fish_is_nth_token 1" -a cp -d 'Copy object'
complete -c s3cmd -n "__fish_is_nth_token 1" -a modify -d 'Modify object metadata'
complete -c s3cmd -n "__fish_is_nth_token 1" -a mv -d 'Move object'
complete -c s3cmd -n "__fish_is_nth_token 1" -a setacl -d 'Modify Access control list for Bucket or Files'
complete -c s3cmd -n "__fish_is_nth_token 1" -a setpolicy -d 'Modify Bucket Policy'
complete -c s3cmd -n "__fish_is_nth_token 1" -a delpolicy -d 'Delete Bucket Policy'
complete -c s3cmd -n "__fish_is_nth_token 1" -a setcors -d 'Modify Bucket CORS'
complete -c s3cmd -n "__fish_is_nth_token 1" -a delcors -d 'Delete Bucket CORS'
complete -c s3cmd -n "__fish_is_nth_token 1" -a payer -d 'Modify Bucket Requester Pays policy'
complete -c s3cmd -n "__fish_is_nth_token 1" -a multipart -d 'Show multipart uploads'
complete -c s3cmd -n "__fish_is_nth_token 1" -a abortmp -d 'Abort a multipart upload'
complete -c s3cmd -n "__fish_is_nth_token 1" -a listmp -d 'List parts of a multipart upload'
complete -c s3cmd -n "__fish_is_nth_token 1" -a accesslog -d 'Enable/disable bucket access logging'
complete -c s3cmd -n "__fish_is_nth_token 1" -a sign -d 'Sign arbitrary string using the secret key'
complete -c s3cmd -n "__fish_is_nth_token 1" -a signurl -d 'Sign an S3 URL to provide limited public access with expiry'
complete -c s3cmd -n "__fish_is_nth_token 1" -a fixbucket -d 'Fix invalid file names in a bucket'
complete -c s3cmd -n "__fish_is_nth_token 1" -a ws-create -d 'Create Website from bucket'
complete -c s3cmd -n "__fish_is_nth_token 1" -a ws-delete -d 'Delete Website'
complete -c s3cmd -n "__fish_is_nth_token 1" -a ws-info -d 'Info about Website'
complete -c s3cmd -n "__fish_is_nth_token 1" -a expire -d 'Set or delete expiration rule for the bucket'
complete -c s3cmd -n "__fish_is_nth_token 1" -a setlifecycle -d 'Upload a lifecycle policy for the bucket'
complete -c s3cmd -n "__fish_is_nth_token 1" -a dellifecycle -d 'Remove a lifecycle policy for the bucket'
complete -c s3cmd -n "__fish_is_nth_token 1" -a cflist -d 'List CloudFront distribution points'
complete -c s3cmd -n "__fish_is_nth_token 1" -a cfinfo -d 'Display CloudFront distribution point parameters'
complete -c s3cmd -n "__fish_is_nth_token 1" -a cfcreate -d 'Create CloudFront distribution point'
complete -c s3cmd -n "__fish_is_nth_token 1" -a cfdelete -d 'Delete CloudFront distribution point'
complete -c s3cmd -n "__fish_is_nth_token 1" -a cfmodify -d 'Change CloudFront distribution point parameters'
complete -c s3cmd -n "__fish_is_nth_token 1" -a cfinvalinfo -d 'Display CloudFront invalidation request(s) status'
# Created against s3cmd version 2.0
complete -c s3cmd -s h -l help -d 'Show help and exit'