mirror of
https://github.com/icewind1991/zox
synced 2026-06-03 18:34:07 +02:00
optimize help a bit
This commit is contained in:
parent
d0f2be6b4f
commit
a59f4db38e
1 changed files with 5 additions and 5 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -83,6 +83,11 @@ fn now() -> u64 {
|
||||||
fn main() -> Result<(), MainError> {
|
fn main() -> Result<(), MainError> {
|
||||||
let args = Args::from_env();
|
let args = Args::from_env();
|
||||||
|
|
||||||
|
if args.help {
|
||||||
|
println!("zox [-h][-l][-r][-t] args");
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
let home = home::home_dir().expect("Cant get home directory");
|
let home = home::home_dir().expect("Cant get home directory");
|
||||||
let history_path = home.join(".z");
|
let history_path = home.join(".z");
|
||||||
|
|
||||||
|
|
@ -94,11 +99,6 @@ fn main() -> Result<(), MainError> {
|
||||||
|
|
||||||
let now = now();
|
let now = now();
|
||||||
|
|
||||||
if args.help {
|
|
||||||
println!("zox [-h][-l][-r][-t] args");
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
|
|
||||||
let history = reader
|
let history = reader
|
||||||
.deserialize::<History>()
|
.deserialize::<History>()
|
||||||
.filter_map(|result| result.ok());
|
.filter_map(|result| result.ok());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue