mirror of
https://github.com/mrfluffy-dev/kami.git
synced 2026-01-17 04:50:32 +00:00
fixed argument bug
This commit is contained in:
10
src/main.rs
10
src/main.rs
@@ -31,13 +31,19 @@ fn main() {
|
||||
anime = true;
|
||||
//look at the next argument and see if it is a search term
|
||||
if let Some(arg) = std::env::args().nth(count + 1) {
|
||||
search = arg;
|
||||
if !arg.starts_with("-") {
|
||||
search = arg;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if arg == "--ln" || arg == "-l" {
|
||||
ln = true;
|
||||
//if let Some(arg) = std::env::args().nth(count + 1) and that arg does not start with a '-' set search to that arg
|
||||
if let Some(arg) = std::env::args().nth(count + 1) {
|
||||
search = arg;
|
||||
if !arg.starts_with("-") {
|
||||
search = arg;
|
||||
}
|
||||
}
|
||||
}
|
||||
if arg == "--chapter" || arg == "-c" {
|
||||
|
||||
Reference in New Issue
Block a user