Fix zsh completion
This commit is contained in:
parent
d4a1b103dc
commit
85aeff183c
|
|
@ -123,17 +123,15 @@ def zsh_option(option: Option):
|
|||
action = ": :"
|
||||
|
||||
if option.short and option.long:
|
||||
option_specifier = (
|
||||
f"(-{option.short} --{option.long})'{{-{option.short},--{option.long}}}'"
|
||||
)
|
||||
option_specifier = f"(-{option.short} --{option.long}){cardinality}'{{-{option.short},--{option.long}}}'"
|
||||
elif option.long:
|
||||
option_specifier = f"--{option.long}"
|
||||
option_specifier = f"{cardinality}--{option.long}"
|
||||
elif option.short:
|
||||
option_specifier = f"-{option.short}"
|
||||
option_specifier = f"{cardinality}-{option.short}"
|
||||
else:
|
||||
raise ValueError("No long or short option specified")
|
||||
|
||||
return f"'{cardinality}{option_specifier}[{help}]{action}' \\"
|
||||
return f"'{option_specifier}[{help}]{action}' \\"
|
||||
|
||||
|
||||
def generate_fish_completion(name: str, options: List[Option]):
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ _hurl() {
|
|||
'--location-trusted[Follow redirects but allows sending the name + password to all hosts that the site may redirect to]' \
|
||||
'--from-entry[Execute Hurl file from ENTRY_NUMBER (starting at 1)]: :' \
|
||||
'*--glob[Specify input files that match the given GLOB. Multiple glob flags may be used]: :' \
|
||||
'*(-H --header)'{-H,--header}'[Pass custom header(s) to server]: :' \
|
||||
'(-H --header)*'{-H,--header}'[Pass custom header(s) to server]: :' \
|
||||
'(-0 --http1.0)'{-0,--http1.0}'[Tell Hurl to use HTTP version 1.0]' \
|
||||
'--http1.1[Tell Hurl to use HTTP version 1.1]' \
|
||||
'--http2[Tell Hurl to use HTTP version 2]' \
|
||||
|
|
|
|||
Loading…
Reference in New Issue