updated fish completions for httpie 3.2.1 (#1394)

This commit is contained in:
Jannik Vieten 2022-05-09 17:24:48 +02:00 committed by GitHub
parent 69fe5dbfd1
commit 80ae644464
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,52 +1,24 @@
function __fish_httpie_styles function __fish_httpie_styles
echo " printf '%s\n' abap algol algol_nu arduino auto autumn borland bw colorful default emacs friendly fruity gruvbox-dark gruvbox-light igor inkpot lovelace manni material monokai murphy native paraiso-dark paraiso-light pastie perldoc pie pie-dark pie-light rainbow_dash rrt sas solarized solarized-dark solarized-light stata stata-dark stata-light tango trac vim vs xcode zenburn
abap end
algol
algol_nu function __fish_httpie_mime_types
arduino test -r /usr/share/mime/types && cat /usr/share/mime/types
auto end
autumn
borland function __fish_httpie_print_args
bw set -l arg (commandline -t)
colorful string match -qe H "$arg" || echo -e $arg"H\trequest headers"
default string match -qe B "$arg" || echo -e $arg"B\trequest body"
emacs string match -qe h "$arg" || echo -e $arg"h\tresponse headers"
friendly string match -qe b "$arg" || echo -e $arg"b\tresponse body"
fruity string match -qe m "$arg" || echo -e $arg"m\tresponse metadata"
gruvbox-dark
gruvbox-light
igor
inkpot
lovelace
manni
material
monokai
murphy
native
paraiso-dark
paraiso-light
pastie
perldoc
rainbow_dash
rrt
sas
solarized
solarized-dark
solarized-light
stata
stata-dark
stata-light
tango
trac
vim
vs
xcode
zenburn"
end end
function __fish_httpie_auth_types function __fish_httpie_auth_types
echo -e "basic\tBasic HTTP auth" echo -e "basic\tBasic HTTP auth"
echo -e "digest\tDigest HTTP auth" echo -e "digest\tDigest HTTP auth"
echo -e "bearer\tBearer HTTP Auth"
end end
function __fish_http_verify_options function __fish_http_verify_options
@ -54,6 +26,7 @@ function __fish_http_verify_options
echo -e "no\tDisable cert verification" echo -e "no\tDisable cert verification"
end end
# Predefined Content Types # Predefined Content Types
complete -c http -s j -l json -d 'Data items are serialized as a JSON object' complete -c http -s j -l json -d 'Data items are serialized as a JSON object'
@ -70,26 +43,28 @@ complete -c http -s x -l compress -d 'Content compressed with Deflate algorithm'
# Output Processing # Output Processing
complete -c http -l pretty -xa "all colors format none" -d 'Controls output processing' complete -c http -l pretty -xa "all colors format none" -d 'Controls output processing'
complete -c http -s s -l style -xa "(__fish_httpie_styles)" -d 'Output coloring style' complete -c http -s s -l style -xa "(__fish_httpie_styles)" -d 'Output coloring style'
complete -c http -l unsorted -d 'Disables all sorting while formatting output' complete -c http -l unsorted -d 'Disables all sorting while formatting output'
complete -c http -l sorted -d 'Re-enables all sorting options while formatting output' complete -c http -l sorted -d 'Re-enables all sorting options while formatting output'
complete -c http -l format-options -x -d 'Controls output formatting' complete -c http -l response-charset -x -d 'Override the response encoding'
complete -c http -l response-mime -xa "(__fish_httpie_mime_types)" -d 'Override the response mime type for coloring and formatting'
complete -c http -l format-options -x -d 'Controls output formatting'
# Output Options # Output Options
complete -c http -s p -l print -x -d 'String specifying what the output should contain' complete -c http -s p -l print -xa "(__fish_httpie_print_args)" -d 'String specifying what the output should contain'
complete -c http -s h -l headers -d 'Print only the response headers' complete -c http -s h -l headers -d 'Print only the response headers'
complete -c http -s b -l body -d 'Print only the response body' complete -c http -s m -l meta -d 'Print only the response metadata'
complete -c http -s v -l verbose -d 'Print the whole request as well as the response' complete -c http -s b -l body -d 'Print only the response body'
complete -c http -l all -d 'Show any intermediary requests/responses' complete -c http -s v -l verbose -d 'Print the whole request as well as the response'
complete -c http -s P -l history-print -x -d 'The same as --print but applies only to intermediary requests/responses' complete -c http -l all -d 'Show any intermediary requests/responses'
complete -c http -s S -l stream -d 'Always stream the response body by line' complete -c http -s S -l stream -d 'Always stream the response body by line'
complete -c http -s o -l output -F -d 'Save output to FILE' complete -c http -s o -l output -F -d 'Save output to FILE'
complete -c http -s d -l download -d 'Download a file' complete -c http -s d -l download -d 'Download a file'
complete -c http -s c -l continue -d 'Resume an interrupted download' complete -c http -s c -l continue -d 'Resume an interrupted download'
complete -c http -s q -l quiet -d 'Do not print to stdout or stderr' complete -c http -s q -l quiet -d 'Do not print to stdout or stderr'
# Sessions # Sessions
@ -115,22 +90,24 @@ complete -c http -l max-headers -x -d 'Maximum number of response headers
complete -c http -l timeout -x -d 'Connection timeout in seconds' complete -c http -l timeout -x -d 'Connection timeout in seconds'
complete -c http -l check-status -d 'Error with non-200 HTTP status code' complete -c http -l check-status -d 'Error with non-200 HTTP status code'
complete -c http -l path-as-is -d 'Bypass dot segment URL squashing' complete -c http -l path-as-is -d 'Bypass dot segment URL squashing'
complete -c http -l chunked -d '' complete -c http -l chunked -d 'Enable streaming via chunked transfer encoding'
# SSL # SSL
complete -c http -l verify -xa "(__fish_http_verify_options)" -d 'Enable/disable cert verification' complete -c http -l verify -xa "(__fish_http_verify_options)" -d 'Enable/disable cert verification'
complete -c http -l ssl -x -d 'Desired protocol version to use' complete -c http -l ssl -x -d 'Desired protocol version to use'
complete -c http -l ciphers -x -d 'String in the OpenSSL cipher list format' complete -c http -l ciphers -x -d 'String in the OpenSSL cipher list format'
complete -c http -l cert -F -d 'Client side SSL certificate' complete -c http -l cert -F -d 'Client side SSL certificate'
complete -c http -l cert-key -F -d 'Private key to use with SSL' complete -c http -l cert-key -F -d 'Private key to use with SSL'
complete -c http -l cert-key-pass -x -d 'Passphrase for the given private key'
# Troubleshooting # Troubleshooting
complete -c http -s I -l ignore-stdin -d 'Do not attempt to read stdin' complete -c http -s I -l ignore-stdin -d 'Do not attempt to read stdin'
complete -c http -l help -d 'Show help' complete -c http -l help -d 'Show help'
complete -c http -l manual -d 'Show the full manual'
complete -c http -l version -d 'Show version' complete -c http -l version -d 'Show version'
complete -c http -l traceback -d 'Prints exception traceback should one occur' complete -c http -l traceback -d 'Prints exception traceback should one occur'
complete -c http -l default-scheme -x -d 'The default scheme to use' complete -c http -l default-scheme -x -d 'The default scheme to use'