diff --git a/src/argc_value.rs b/src/argc_value.rs index 771a2b3b..305174dd 100644 --- a/src/argc_value.rs +++ b/src/argc_value.rs @@ -106,7 +106,7 @@ impl ArgcValue { } } ArgcValue::Error((error, exit)) => { - return format!("cat >&2 <<-'EOF' \n{}\nEOF\nexit {}", error, exit) + return format!("command cat >&2 <<-'EOF' \n{}\nEOF\nexit {}", error, exit) } } } diff --git a/tests/snapshots/integration__main_fn__global_without_arg.snap b/tests/snapshots/integration__main_fn__global_without_arg.snap index 087fe51e..90fa8f6e 100644 --- a/tests/snapshots/integration__main_fn__global_without_arg.snap +++ b/tests/snapshots/integration__main_fn__global_without_arg.snap @@ -6,7 +6,7 @@ RUN prog abc OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: `prog` requires a subcommand but one was not provided [subcommands: cmd] diff --git a/tests/snapshots/integration__main_fn__nested_subcmd_no_main.snap b/tests/snapshots/integration__main_fn__nested_subcmd_no_main.snap index aa76e5fd..c31418e8 100644 --- a/tests/snapshots/integration__main_fn__nested_subcmd_no_main.snap +++ b/tests/snapshots/integration__main_fn__nested_subcmd_no_main.snap @@ -6,7 +6,7 @@ RUN prog cmd OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmd COMMANDS: diff --git a/tests/snapshots/integration__main_fn__subcmd_no_main.snap b/tests/snapshots/integration__main_fn__subcmd_no_main.snap index 229db9d8..dbc4d38c 100644 --- a/tests/snapshots/integration__main_fn__subcmd_no_main.snap +++ b/tests/snapshots/integration__main_fn__subcmd_no_main.snap @@ -6,7 +6,7 @@ RUN prog OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog COMMANDS: diff --git a/tests/snapshots/integration__spec__arg_subcmd_help.snap b/tests/snapshots/integration__spec__arg_subcmd_help.snap index f465efa9..77954c55 100644 --- a/tests/snapshots/integration__spec__arg_subcmd_help.snap +++ b/tests/snapshots/integration__spec__arg_subcmd_help.snap @@ -6,7 +6,7 @@ expression: data prog cmda -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmda EOF @@ -16,7 +16,7 @@ exit 0 prog cmdb -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdb [VAL] ARGS: @@ -29,7 +29,7 @@ exit 0 prog cmdc -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdc [VAL]... ARGS: @@ -42,7 +42,7 @@ exit 0 prog cmdd -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdd ... ARGS: @@ -55,7 +55,7 @@ exit 0 prog cmde -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmde ARGS: @@ -68,7 +68,7 @@ exit 0 prog cmdf -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdf [VAL] ARGS: @@ -81,7 +81,7 @@ exit 0 prog cmdg -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdg [VAL] ARGS: @@ -94,7 +94,7 @@ exit 0 prog cmdh -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdh [VAL] ARGS: @@ -107,7 +107,7 @@ exit 0 prog cmdi -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdi [VAL] ARGS: @@ -120,7 +120,7 @@ exit 0 prog cmdj -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdj [VAL] ARGS: @@ -133,7 +133,7 @@ exit 0 prog cmdk -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdk [VAL] ARGS: @@ -146,7 +146,7 @@ exit 0 prog cmdl -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdl [VAL]... ARGS: @@ -159,7 +159,7 @@ exit 0 prog cmdm -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdm ARGS: @@ -172,7 +172,7 @@ exit 0 prog cmdn -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdn ... ARGS: @@ -185,7 +185,7 @@ exit 0 prog cmdo -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdo [FILE] ARGS: @@ -198,7 +198,7 @@ exit 0 prog cmdp -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdp [VAL1]... [VAL2]... ARGS: @@ -212,7 +212,7 @@ exit 0 prog cmdq -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdq ... ARGS: @@ -226,7 +226,7 @@ exit 0 prog cmdr -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdr ARGS: diff --git a/tests/snapshots/integration__spec__option_help.snap b/tests/snapshots/integration__spec__option_help.snap index ed589863..ab0369d1 100644 --- a/tests/snapshots/integration__spec__option_help.snap +++ b/tests/snapshots/integration__spec__option_help.snap @@ -6,7 +6,7 @@ expression: data prog cmda -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmda [OPTIONS] OPTIONS: @@ -35,7 +35,7 @@ exit 0 prog cmdb -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdb --oa --ob ... --oc ... --oca --ocb ... --occ ... OPTIONS: @@ -54,7 +54,7 @@ exit 0 prog cmdc -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdc [OPTIONS] OPTIONS: diff --git a/tests/snapshots/integration__spec__option_multi_vals.snap b/tests/snapshots/integration__spec__option_multi_vals.snap index 4abd8285..3011f9ae 100644 --- a/tests/snapshots/integration__spec__option_multi_vals.snap +++ b/tests/snapshots/integration__spec__option_multi_vals.snap @@ -6,7 +6,7 @@ RUN prog -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog [OPTIONS] OPTIONS: diff --git a/tests/snapshots/integration__spec__same_option_positional.snap b/tests/snapshots/integration__spec__same_option_positional.snap index d5f151e8..6307bc5c 100644 --- a/tests/snapshots/integration__spec__same_option_positional.snap +++ b/tests/snapshots/integration__spec__same_option_positional.snap @@ -6,7 +6,7 @@ RUN prog -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog [OPTIONS] [URL] ARGS: diff --git a/tests/snapshots/integration__validate__arg_choice.snap b/tests/snapshots/integration__validate__arg_choice.snap index 609d0922..b211ba2e 100644 --- a/tests/snapshots/integration__validate__arg_choice.snap +++ b/tests/snapshots/integration__validate__arg_choice.snap @@ -6,7 +6,7 @@ RUN prog cmdh val OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: invalid value `val` for `[VAL]` [possible values: x, y, z] diff --git a/tests/snapshots/integration__validate__arg_choice_fn.snap b/tests/snapshots/integration__validate__arg_choice_fn.snap index 5ec39e18..fe72d73c 100644 --- a/tests/snapshots/integration__validate__arg_choice_fn.snap +++ b/tests/snapshots/integration__validate__arg_choice_fn.snap @@ -6,7 +6,7 @@ RUN prog cmdj val OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: invalid value `val` for `[VAL]` [possible values: abc, def, ghi] diff --git a/tests/snapshots/integration__validate__arg_choice_multi.snap b/tests/snapshots/integration__validate__arg_choice_multi.snap index c6eadda5..b97fcc43 100644 --- a/tests/snapshots/integration__validate__arg_choice_multi.snap +++ b/tests/snapshots/integration__validate__arg_choice_multi.snap @@ -6,7 +6,7 @@ RUN prog cmdl abc val OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: invalid value `val` for `[VAL]...` [possible values: abc, def, ghi] diff --git a/tests/snapshots/integration__validate__arg_help_subcmd.snap b/tests/snapshots/integration__validate__arg_help_subcmd.snap index c4abe245..0fbc6947 100644 --- a/tests/snapshots/integration__validate__arg_help_subcmd.snap +++ b/tests/snapshots/integration__validate__arg_help_subcmd.snap @@ -6,7 +6,7 @@ RUN prog help cmdd OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog cmdd ... ARGS: diff --git a/tests/snapshots/integration__validate__arg_invalid_subcmd.snap b/tests/snapshots/integration__validate__arg_invalid_subcmd.snap index 9c2bc1af..8ac3e5cd 100644 --- a/tests/snapshots/integration__validate__arg_invalid_subcmd.snap +++ b/tests/snapshots/integration__validate__arg_invalid_subcmd.snap @@ -6,7 +6,7 @@ RUN prog foo OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: `prog` requires a subcommand but one was not provided [subcommands: cmda, cmdb] diff --git a/tests/snapshots/integration__validate__arg_missing.snap b/tests/snapshots/integration__validate__arg_missing.snap index a570c6d8..ba91f184 100644 --- a/tests/snapshots/integration__validate__arg_missing.snap +++ b/tests/snapshots/integration__validate__arg_missing.snap @@ -6,7 +6,7 @@ RUN prog cmdd OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: the following required arguments were not provided: ... diff --git a/tests/snapshots/integration__validate__arg_unknown.snap b/tests/snapshots/integration__validate__arg_unknown.snap index d28590ab..2fd12d3d 100644 --- a/tests/snapshots/integration__validate__arg_unknown.snap +++ b/tests/snapshots/integration__validate__arg_unknown.snap @@ -6,7 +6,7 @@ RUN prog cmdb v1 v2 OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: unexpected argument `v2` found USAGE: prog cmdb [VAL] diff --git a/tests/snapshots/integration__validate__choice_access_vars.snap b/tests/snapshots/integration__validate__choice_access_vars.snap index 6290e9c0..9303a42f 100644 --- a/tests/snapshots/integration__validate__choice_access_vars.snap +++ b/tests/snapshots/integration__validate__choice_access_vars.snap @@ -6,7 +6,7 @@ expression: data prog --fa foo OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: invalid value `foo` for `[VAL]` [possible values: abc] @@ -19,7 +19,7 @@ exit 1 prog foo OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: invalid value `foo` for `[VAL]` [possible values: def] diff --git a/tests/snapshots/integration__validate__empty_choices.snap b/tests/snapshots/integration__validate__empty_choices.snap index 91428897..e6dab3c3 100644 --- a/tests/snapshots/integration__validate__empty_choices.snap +++ b/tests/snapshots/integration__validate__empty_choices.snap @@ -6,7 +6,7 @@ expression: data prog --oa foo OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: invalid value `foo` for `` [possible values: ] diff --git a/tests/snapshots/integration__validate__flag_not_multiple.snap b/tests/snapshots/integration__validate__flag_not_multiple.snap index 10b77288..ad247482 100644 --- a/tests/snapshots/integration__validate__flag_not_multiple.snap +++ b/tests/snapshots/integration__validate__flag_not_multiple.snap @@ -6,7 +6,7 @@ RUN prog cmda -a -a OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: the argument `-a` cannot be used multiple times USAGE: prog cmda [OPTIONS] diff --git a/tests/snapshots/integration__validate__flag_with_value.snap b/tests/snapshots/integration__validate__flag_with_value.snap index 1f405cd1..e0feefa6 100644 --- a/tests/snapshots/integration__validate__flag_with_value.snap +++ b/tests/snapshots/integration__validate__flag_with_value.snap @@ -6,7 +6,7 @@ RUN prog cmda -a=3 OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: unexpected value `3` for `-a` found; no more were expected USAGE: prog cmda [OPTIONS] diff --git a/tests/snapshots/integration__validate__help_version.snap b/tests/snapshots/integration__validate__help_version.snap index b670de48..34075e28 100644 --- a/tests/snapshots/integration__validate__help_version.snap +++ b/tests/snapshots/integration__validate__help_version.snap @@ -6,7 +6,7 @@ expression: data prog help OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' prog 1.0.0 nobody Test argc @@ -20,7 +20,7 @@ exit 0 prog --help OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' prog 1.0.0 nobody Test argc @@ -34,7 +34,7 @@ exit 0 prog -help OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' prog 1.0.0 nobody Test argc @@ -48,7 +48,7 @@ exit 0 prog -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' prog 1.0.0 nobody Test argc @@ -62,7 +62,7 @@ exit 0 prog --version OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' prog 1.0.0 EOF exit 0 @@ -71,7 +71,7 @@ exit 0 prog -version OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' prog 1.0.0 EOF exit 0 @@ -80,7 +80,7 @@ exit 0 prog -V OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' prog 1.0.0 EOF exit 0 diff --git a/tests/snapshots/integration__validate__help_version_exist.snap b/tests/snapshots/integration__validate__help_version_exist.snap index ce6e2186..2ae64efd 100644 --- a/tests/snapshots/integration__validate__help_version_exist.snap +++ b/tests/snapshots/integration__validate__help_version_exist.snap @@ -6,7 +6,7 @@ expression: data prog -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' USAGE: prog [OPTIONS] OPTIONS: diff --git a/tests/snapshots/integration__validate__option_choice.snap b/tests/snapshots/integration__validate__option_choice.snap index 8d15dcad..47b39c6d 100644 --- a/tests/snapshots/integration__validate__option_choice.snap +++ b/tests/snapshots/integration__validate__option_choice.snap @@ -6,7 +6,7 @@ RUN prog cmda --ca val OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: invalid value `val` for `` [possible values: x, y, z] diff --git a/tests/snapshots/integration__validate__option_choice_fn.snap b/tests/snapshots/integration__validate__option_choice_fn.snap index 5e6ba98a..9e324fc1 100644 --- a/tests/snapshots/integration__validate__option_choice_fn.snap +++ b/tests/snapshots/integration__validate__option_choice_fn.snap @@ -6,7 +6,7 @@ RUN prog cmda --cc val OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: invalid value `val` for `` [possible values: abc, def, ghi] diff --git a/tests/snapshots/integration__validate__option_choice_multi.snap b/tests/snapshots/integration__validate__option_choice_multi.snap index 5fac2e61..0e4d88bc 100644 --- a/tests/snapshots/integration__validate__option_choice_multi.snap +++ b/tests/snapshots/integration__validate__option_choice_multi.snap @@ -6,7 +6,7 @@ RUN prog cmda --ce abc val OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: invalid value `val` for `` [possible values: abc, def, ghi] diff --git a/tests/snapshots/integration__validate__option_mismatch_values.snap b/tests/snapshots/integration__validate__option_mismatch_values.snap index 974294da..b3368606 100644 --- a/tests/snapshots/integration__validate__option_mismatch_values.snap +++ b/tests/snapshots/integration__validate__option_mismatch_values.snap @@ -6,7 +6,7 @@ RUN prog cmda -o file1 OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: invalid values for `--od ` USAGE: prog cmda [OPTIONS] diff --git a/tests/snapshots/integration__validate__option_missing.snap b/tests/snapshots/integration__validate__option_missing.snap index fc4cdd17..a3088f45 100644 --- a/tests/snapshots/integration__validate__option_missing.snap +++ b/tests/snapshots/integration__validate__option_missing.snap @@ -6,7 +6,7 @@ RUN prog cmdb OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: the following required arguments were not provided: --oa --ob ... diff --git a/tests/snapshots/integration__validate__option_not_multiple.snap b/tests/snapshots/integration__validate__option_not_multiple.snap index cdfdf523..4a590533 100644 --- a/tests/snapshots/integration__validate__option_not_multiple.snap +++ b/tests/snapshots/integration__validate__option_not_multiple.snap @@ -6,7 +6,7 @@ RUN prog cmda -e -e OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: the argument `-e` cannot be used multiple times USAGE: prog cmda [OPTIONS] diff --git a/tests/snapshots/integration__validate__option_unknown.snap b/tests/snapshots/integration__validate__option_unknown.snap index ec7ec88a..317bded0 100644 --- a/tests/snapshots/integration__validate__option_unknown.snap +++ b/tests/snapshots/integration__validate__option_unknown.snap @@ -6,7 +6,7 @@ RUN prog cmda --unknown OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: unexpected argument `--unknown` found USAGE: prog cmda [OPTIONS] diff --git a/tests/snapshots/integration__validate__param_missing.snap b/tests/snapshots/integration__validate__param_missing.snap index 82ac53bc..a7e2d40b 100644 --- a/tests/snapshots/integration__validate__param_missing.snap +++ b/tests/snapshots/integration__validate__param_missing.snap @@ -6,7 +6,7 @@ RUN prog OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: the following required arguments were not provided: --ao diff --git a/tests/snapshots/integration__validate__param_missing_parent.snap b/tests/snapshots/integration__validate__param_missing_parent.snap index d7e20049..79ce3012 100644 --- a/tests/snapshots/integration__validate__param_missing_parent.snap +++ b/tests/snapshots/integration__validate__param_missing_parent.snap @@ -6,7 +6,7 @@ RUN prog foo OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' error: the following required arguments were not provided: --ao diff --git a/tests/snapshots/integration__wrap_help__nowrap.snap b/tests/snapshots/integration__wrap_help__nowrap.snap index fa6f0793..3973eb76 100644 --- a/tests/snapshots/integration__wrap_help__nowrap.snap +++ b/tests/snapshots/integration__wrap_help__nowrap.snap @@ -6,7 +6,7 @@ RUN prog -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' A simple cli Extra lines after the @cmd or @describe, which don't start with an @, are diff --git a/tests/snapshots/integration__wrap_help__wrap.snap b/tests/snapshots/integration__wrap_help__wrap.snap index 1777d25d..c1199b5d 100644 --- a/tests/snapshots/integration__wrap_help__wrap.snap +++ b/tests/snapshots/integration__wrap_help__wrap.snap @@ -6,7 +6,7 @@ RUN prog -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' A simple cli Extra lines after the @cmd or @describe, which don't start with an @, are diff --git a/tests/snapshots/integration__wrap_help__wrap2.snap b/tests/snapshots/integration__wrap_help__wrap2.snap index e448bad0..d54e1259 100644 --- a/tests/snapshots/integration__wrap_help__wrap2.snap +++ b/tests/snapshots/integration__wrap_help__wrap2.snap @@ -6,7 +6,7 @@ RUN prog foo -h OUTPUT -cat >&2 <<-'EOF' +command cat >&2 <<-'EOF' Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Arcu cursus euismod quis viverra.