11use std:: path:: PathBuf ;
22
33use anyhow:: { Context , Error } ;
4- use clap:: Parser ;
4+ use clap:: { Parser , ValueHint } ;
55use itertools:: Itertools ;
66
77use task_maker_dag:: DagPriority ;
@@ -64,7 +64,7 @@ pub struct LoggerOpt {
6464#[ derive( Parser , Debug , Clone ) ]
6565pub struct FindTaskOpt {
6666 /// Directory of the task
67- #[ clap( short = 't' , long = "task-dir" , default_value = "" ) ]
67+ #[ clap( short = 't' , long = "task-dir" , default_value = "" , value_hint = ValueHint :: DirPath ) ]
6868 pub task_dir : PathBuf ,
6969
7070 /// Look at most for this number of parents for searching the task
@@ -117,7 +117,7 @@ pub struct ExecutionOpt {
117117 pub num_cores : Option < usize > ,
118118
119119 /// Run the evaluation on a remote server instead of locally
120- #[ clap( long = "evaluate-on" ) ]
120+ #[ clap( long = "evaluate-on" , value_hint = ValueHint :: Url ) ]
121121 pub evaluate_on : Option < String > ,
122122
123123 /// The name to use for the client in remote executions
@@ -133,7 +133,7 @@ pub struct ExecutionOpt {
133133#[ derive( Parser , Debug , Clone ) ]
134134pub struct StorageOpt {
135135 /// Where to store the storage files, including the cache
136- #[ clap( long = "store-dir" ) ]
136+ #[ clap( long = "store-dir" , value_hint = ValueHint :: DirPath ) ]
137137 pub store_dir : Option < PathBuf > ,
138138
139139 /// Maximum size of the storage directory, in MiB
@@ -151,12 +151,13 @@ pub struct FilterOpt {
151151 ///
152152 /// Note that just the file name is checked (e.g. sol.cpp is the same as sol/sol.cpp). Without
153153 /// specifying anything all the solutions are executed.
154+ #[ clap( value_hint = ValueHint :: FilePath ) ]
154155 pub filter : Vec < String > ,
155156
156157 /// Evaluate only the solution with the specified path
157158 ///
158159 /// The solution can reside anywhere in the filesystem.
159- #[ clap( long, short) ]
160+ #[ clap( long, short, value_hint = ValueHint :: FilePath ) ]
160161 pub solution : Vec < PathBuf > ,
161162}
162163
0 commit comments