hurlfmt/cli/options/
commands.rs

1/*
2 * Hurl (https://hurl.dev)
3 * Copyright (C) 2025 Orange
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 *          http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18// Generated by bin/spec/options/generate_source.py - Do not modify
19
20pub fn input_files() -> clap::Arg {
21    clap::Arg::new("input_files")
22        .value_name("FILES")
23        .help("Set the input file to use")
24        .required(false)
25        .index(1)
26        .num_args(1..)
27}
28
29pub fn check() -> clap::Arg {
30    clap::Arg::new("check")
31        .long("check")
32        .help("Run in check mode")
33        .conflicts_with("output")
34        .action(clap::ArgAction::SetTrue)
35}
36
37pub fn color() -> clap::Arg {
38    clap::Arg::new("color")
39        .long("color")
40        .help("Colorize Output")
41        .conflicts_with("no_color")
42        .conflicts_with("in_place")
43        .action(clap::ArgAction::SetTrue)
44}
45
46pub fn in_place() -> clap::Arg {
47    clap::Arg::new("in_place")
48        .long("in-place")
49        .help("Modify files in place")
50        .conflicts_with("output")
51        .conflicts_with("color")
52        .action(clap::ArgAction::SetTrue)
53}
54
55pub fn input_format() -> clap::Arg {
56    clap::Arg::new("input_format")
57        .long("in")
58        .value_name("FORMAT")
59        .help("Specify input format: hurl or curl [default: hurl]")
60        .num_args(1)
61}
62
63pub fn no_color() -> clap::Arg {
64    clap::Arg::new("no_color")
65        .long("no-color")
66        .help("Do not colorize output")
67        .conflicts_with("color")
68        .action(clap::ArgAction::SetTrue)
69}
70
71pub fn output() -> clap::Arg {
72    clap::Arg::new("output")
73        .long("output")
74        .short('o')
75        .value_name("FILE")
76        .help("Write to FILE instead of stdout")
77        .num_args(1)
78}
79
80pub fn output_format() -> clap::Arg {
81    clap::Arg::new("output_format")
82        .long("out")
83        .value_name("FORMAT")
84        .help("Specify output format: hurl, json or html [default: hurl]")
85        .conflicts_with("check")
86        .num_args(1)
87}
88
89pub fn standalone() -> clap::Arg {
90    clap::Arg::new("standalone")
91        .long("standalone")
92        .help("Standalone HTML")
93        .conflicts_with("no_color")
94        .action(clap::ArgAction::SetTrue)
95}