Fix powershell completion
This commit is contained in:
parent
7467f08d8f
commit
c5aa950685
|
|
@ -104,4 +104,4 @@ jobs:
|
|||
if: always()
|
||||
run: |
|
||||
sudo apt-get install -y zsh fish powershell
|
||||
bin/check/completion.sh
|
||||
bin/check/completion.sh
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ _hurlfmt() {
|
|||
|
||||
local context curcontext="$curcontext" state line
|
||||
_arguments "${_arguments_options[@]}" \
|
||||
'--check[Run in 'check' mode]' \
|
||||
'--check[Run in check mode]' \
|
||||
'--color[Colorize Output]' \
|
||||
'--format[Specify output format: hurl, json or html]: :' \
|
||||
'--in-place[Modify files in place]' \
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ Register-ArgumentCompleter -Native -CommandName 'hurlfmt' -ScriptBlock {
|
|||
|
||||
$completions = @(switch ($command) {
|
||||
'hurlfmt'
|
||||
{[CompletionResult]::new('--check', 'check', [CompletionResultType]::ParameterName, 'Run in 'check' mode')
|
||||
{[CompletionResult]::new('--check', 'check', [CompletionResultType]::ParameterName, 'Run in check mode')
|
||||
[CompletionResult]::new('--color', 'color', [CompletionResultType]::ParameterName, 'Colorize Output')
|
||||
[CompletionResult]::new('--format', 'format', [CompletionResultType]::ParameterName, 'Specify output format: hurl, json or html')
|
||||
[CompletionResult]::new('--in-place', 'in-place', [CompletionResultType]::ParameterName, 'Modify files in place')
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
complete -c hurlfmt -l check -d 'Run in 'check' mode'
|
||||
complete -c hurlfmt -l check -d 'Run in check mode'
|
||||
complete -c hurlfmt -l color -d 'Colorize Output'
|
||||
complete -c hurlfmt -l format -d 'Specify output format: hurl, json or html'
|
||||
complete -c hurlfmt -l in-place -d 'Modify files in place'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.TH hurl 1 "27 Aug 2024" "hurl 5.0.0-SNAPSHOT" " Hurl Manual"
|
||||
.TH hurl 1 "28 Aug 2024" "hurl 5.0.0-SNAPSHOT" " Hurl Manual"
|
||||
.SH NAME
|
||||
|
||||
hurl - run and test HTTP requests.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
.TH hurl 1 "27 Aug 2024" "hurl 5.0.0-SNAPSHOT" " Hurl Manual"
|
||||
.TH hurl 1 "28 Aug 2024" "hurl 5.0.0-SNAPSHOT" " Hurl Manual"
|
||||
.SH NAME
|
||||
|
||||
hurlfmt - format Hurl files
|
||||
|
|
@ -60,7 +60,7 @@ hurlfmt can also be used to convert a curl command-line to Hurl
|
|||
|
||||
.IP "--check "
|
||||
|
||||
Run in 'check' mode. Exits with 0 if input is formatted correctly, 1 otherwise.
|
||||
Run in check mode. Exits with 0 if input is formatted correctly, 1 otherwise.
|
||||
|
||||
This can not be used with \fI--output\fP.
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ Fruit: Raspberry
|
|||
|
||||
### --check {#check}
|
||||
|
||||
Run in 'check' mode. Exits with 0 if input is formatted correctly, 1 otherwise.
|
||||
Run in check mode. Exits with 0 if input is formatted correctly, 1 otherwise.
|
||||
|
||||
This can not be used with [--output](#output).
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
name: check
|
||||
long: check
|
||||
help: Run in 'check' mode
|
||||
help: Run in check mode
|
||||
conflict: format output
|
||||
---
|
||||
Run in 'check' mode. Exits with 0 if input is formatted correctly, 1 otherwise.
|
||||
Run in check mode. Exits with 0 if input is formatted correctly, 1 otherwise.
|
||||
|
||||
This can not be used with [--output](#output).
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Arguments:
|
|||
[FILES]... Set the input file to use
|
||||
|
||||
Options:
|
||||
--check Run in 'check' mode
|
||||
--check Run in check mode
|
||||
--color Colorize Output
|
||||
--in-place Modify files in place
|
||||
--in <FORMAT> Specify input format: hurl or curl [default: hurl]
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ pub fn input_files() -> clap::Arg {
|
|||
pub fn check() -> clap::Arg {
|
||||
clap::Arg::new("check")
|
||||
.long("check")
|
||||
.help("Run in 'check' mode")
|
||||
.help("Run in check mode")
|
||||
.conflicts_with("format")
|
||||
.conflicts_with("output")
|
||||
.action(clap::ArgAction::SetTrue)
|
||||
|
|
|
|||
Loading…
Reference in New Issue