@@ -53,7 +53,7 @@ pub struct Args {
5353
5454 /// The amount of threads to use. Defaults to 0, indicating the amount of logical processors.
5555 /// Set to 1 to use only a single thread.
56- #[ clap( short = 't' , long = "threads" , default_value_t = DEFAULT_THREADS ) ]
56+ #[ clap( short = 't' , long = "threads" , default_value_t = DEFAULT_THREADS , global = true ) ]
5757 pub threads : usize ,
5858
5959 /// The format with which to print byte counts.
@@ -63,34 +63,35 @@ pub struct Args {
6363 value_enum,
6464 default_value_t = dft_format( ) ,
6565 ignore_case = true ,
66+ global = true ,
6667 ) ]
6768 pub format : ByteFormat ,
6869
6970 /// Display apparent size instead of disk usage.
70- #[ clap( short = 'A' , long) ]
71+ #[ clap( short = 'A' , long, global = true ) ]
7172 pub apparent_size : bool ,
7273
7374 /// Count hard-linked files each time they are seen
74- #[ clap( short = 'l' , long) ]
75+ #[ clap( short = 'l' , long, global = true ) ]
7576 pub count_hard_links : bool ,
7677
7778 /// If set, we will not cross filesystems or traverse mount points
78- #[ clap( short = 'x' , long) ]
79+ #[ clap( short = 'x' , long, global = true ) ]
7980 pub stay_on_filesystem : bool ,
8081
8182 /// One or more absolute directories to ignore. Note that these are not ignored if they are passed as input path.
8283 ///
8384 /// Hence, they will only be ignored if they are eventually reached as part of the traversal.
84- #[ clap( long = "ignore-dirs" , short = 'i' , value_parser) ]
85+ #[ clap( long = "ignore-dirs" , short = 'i' , value_parser, global = true ) ]
8586 #[ cfg_attr( target_os = "linux" , clap( default_values = & [ "/proc" , "/dev" , "/sys" , "/run" ] ) ) ]
8687 pub ignore_dirs : Vec < PathBuf > ,
8788
8889 /// One or more input files or directories. If unset, we will use all entries in the current working directory.
89- #[ clap( value_parser) ]
90+ #[ clap( value_parser, global = true ) ]
9091 pub input : Vec < PathBuf > ,
9192
9293 /// Write a log file with debug information, including panics.
93- #[ clap( long) ]
94+ #[ clap( long, global = true ) ]
9495 pub log_file : Option < PathBuf > ,
9596}
9697
@@ -103,9 +104,6 @@ pub enum Command {
103104 /// Do not check entries for presence when listing a directory to avoid slugging performance on slow filesystems.
104105 #[ clap( long, short = 'e' ) ]
105106 no_entry_check : bool ,
106- /// One or more input files or directories. If unset, we will use all entries in the current working directory.
107- #[ clap( value_parser) ]
108- input : Vec < PathBuf > ,
109107 } ,
110108 /// Aggregate the consumed space of one or more directories or files
111109 #[ clap( name = "aggregate" , visible_alias = "a" ) ]
@@ -120,9 +118,6 @@ pub enum Command {
120118 /// If set, no total column will be computed for multiple inputs
121119 #[ clap( long) ]
122120 no_total : bool ,
123- /// One or more input files or directories. If unset, we will use all entries in the current working directory.
124- #[ clap( value_parser) ]
125- input : Vec < PathBuf > ,
126121 } ,
127122 /// Generate shell completions
128123 Completions {
0 commit comments