We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b8b265 commit d959304Copy full SHA for d959304
1 file changed
src/lib.rs
@@ -14,7 +14,7 @@ pub mod parse {
14
use std::env;
15
16
pub fn process_name() -> String {
17
- return env::args().collect();
+ return env::args().collect()[0];
18
}
19
20
pub fn subcommands() -> Vec<String>{
@@ -33,6 +33,10 @@ pub mod parse {
33
let args: Vec<String> = env::args().collect();
34
let mut c_index: usize = 0;
35
for i in &args {
36
+ if c_index == 0 {
37
+ c_index = 1;
38
+ continue;
39
+ }
40
if i.starts_with("--"){
41
if args[c_index].starts_with("--"){
42
switches.push(i.to_owned());
0 commit comments