@@ -181,7 +181,11 @@ pub struct InfoCliOptions {
181181#[ derive( Clone , Debug , Args , PartialEq , Eq ) ]
182182#[ command( next_help_heading = tr!( ascii:: HEADING ) ) ]
183183pub struct AsciiCliOptions {
184- #[ arg( long, value_name = tr!( value:: STRING ) , value_hint = ValueHint :: CommandString , help = tr!( ascii:: ASCII_INPUT ) ) ]
184+ #[ arg( long, value_name = tr!( value:: STRING ) , value_hint = ValueHint :: CommandString ) ]
185+ #[ arg(
186+ help = tr!( ascii:: ascii_input:: SHORT ) ,
187+ long_help = tr!( ascii:: ascii_input:: LONG )
188+ ) ]
185189 pub ascii_input : Option < String > ,
186190 #[ arg(
187191 long,
@@ -201,7 +205,13 @@ pub struct AsciiCliOptions {
201205 help = tr!( ascii:: ASCII_LANGUAGE )
202206 ) ]
203207 pub ascii_language : Option < Language > ,
204- #[ arg( long, default_value = "auto" , value_name = tr!( value:: WHEN ) , value_enum, help = tr!( ascii:: TRUE_COLOR ) ) ]
208+ #[ arg( long, value_name = tr!( value:: WHEN ) , value_enum, default_value = "auto" ) ]
209+ #[ arg(
210+ help = tr!( ascii:: true_color:: SHORT , def => "auto" , pos => "auto, never, always" ) ,
211+ long_help = tr!( ascii:: true_color:: LONG , def => "auto" , pos => "auto, never, always" ) ,
212+ hide_possible_values = true ,
213+ hide_default_value = true
214+ ) ]
205215 pub true_color : When ,
206216}
207217
@@ -210,16 +220,26 @@ pub struct AsciiCliOptions {
210220pub struct ImageCliOptions {
211221 #[ arg( long, short, value_name = tr!( value:: IMAGE ) , value_hint = ValueHint :: FilePath , help = tr!( image:: IMAGE ) ) ]
212222 pub image : Option < PathBuf > ,
213- #[ arg( long, value_enum, requires = "image" , value_name = tr!( value:: PROTOCOL ) , help = tr!( image:: IMAGE_PROTOCOL ) ) ]
223+ #[ arg( long, value_enum, requires = "image" , value_name = tr!( value:: PROTOCOL ) ) ]
224+ #[ arg(
225+ help = tr!( image:: image_protocol:: SHORT , pos => "kitty, sixel, iterm" ) ,
226+ long_help = tr!( image:: image_protocol:: LONG , pos => "kitty, sixel, iterm" ) ,
227+ hide_possible_values = true
228+ ) ]
214229 pub image_protocol : Option < ImageProtocol > ,
215230 #[ arg(
216231 long,
217232 value_name = tr!( value:: VALUE ) ,
218233 requires = "image" ,
219234 default_value_t = 16usize ,
220235 value_parser = PossibleValuesParser :: new( COLOR_RESOLUTIONS )
221- . map( |s| s. parse:: <usize >( ) . unwrap( ) ) ,
222- help = tr!( image:: COLOR_RESOLUTION )
236+ . map( |s| s. parse:: <usize >( ) . unwrap( ) )
237+ ) ]
238+ #[ arg(
239+ help = tr!( image:: color_resolution:: SHORT , def => 16 , pos => COLOR_RESOLUTIONS . join( ", " ) ) ,
240+ long_help = tr!( image:: color_resolution:: LONG , def => 16 , pos => COLOR_RESOLUTIONS . join( ", " ) ) ,
241+ hide_default_value = true ,
242+ hide_possible_values = true
223243 ) ]
224244 pub color_resolution : usize ,
225245}
@@ -233,12 +253,21 @@ pub struct TextForamttingCliOptions {
233253 value_name = "X" ,
234254 value_parser = value_parser!( u8 ) . range( ..16 ) ,
235255 num_args = 1 ..=6 ,
236- help = tr!( text:: COLORS )
256+ ) ]
257+ #[ arg(
258+ help = tr!( text:: colors:: SHORT ) ,
259+ long_help = tr!( text:: colors:: LONG )
237260 ) ]
238261 pub text_colors : Vec < u8 > ,
239262 #[ arg( long, short = 'z' , help = tr!( text:: ISO_TIME ) ) ]
240263 pub iso_time : bool ,
241- #[ arg( long, value_name = tr!( value:: SEPARATOR ) , default_value = "plain" , value_enum, help = tr!( text:: NUMBER_SEPARATOR ) ) ]
264+ #[ arg( long, value_name = tr!( value:: SEPARATOR ) , value_enum, default_value = "plain" ) ]
265+ #[ arg(
266+ help = tr!( text:: number_separator:: SHORT , def => "plain" , pos => "plain, comma, space, underscore" ) ,
267+ long_help = tr!( text:: number_separator:: LONG , def => "plain" , pos => "plain, comma, space, underscore" ) ,
268+ hide_default_value = true ,
269+ hide_possible_values = true ,
270+ ) ]
242271 pub number_separator : NumberSeparator ,
243272 #[ arg( long, help = tr!( text:: NO_BOLD ) ) ]
244273 pub no_bold : bool ,
@@ -257,9 +286,19 @@ pub struct VisualsCliOptions {
257286#[ derive( Clone , Debug , Args , PartialEq , Eq , Default ) ]
258287#[ command( next_help_heading = tr!( dev:: HEADING ) ) ]
259288pub struct DeveloperCliOptions {
260- #[ arg( long, short, value_name = tr!( value:: FORMAT ) , value_enum, help = tr!( dev:: OUTPUT ) ) ]
289+ #[ arg( long, short, value_name = tr!( value:: FORMAT ) , value_enum) ]
290+ #[ arg(
291+ help = tr!( dev:: output:: SHORT , pos => "json, yaml" ) ,
292+ long_help = tr!( dev:: output:: LONG , pos => "json, yaml" ) ,
293+ hide_possible_values = true
294+ ) ]
261295 pub output : Option < SerializationFormat > ,
262- #[ arg( long = "generate" , value_name = tr!( value:: SHELL ) , value_enum, help = tr!( dev:: COMPLETION ) ) ]
296+ #[ arg( long = "generate" , value_name = tr!( value:: SHELL ) , value_enum) ]
297+ #[ arg(
298+ help = tr!( dev:: completion:: SHORT , pos => "bash, elvish, fish, powershell, zsh" ) ,
299+ long_help = tr!( dev:: completion:: LONG , pos => "bash, elvish, fish, powershell, zsh" ) ,
300+ hide_possible_values = true ,
301+ ) ]
263302 pub completion : Option < Shell > ,
264303}
265304
0 commit comments