mirror of
https://git.2ki.xyz/spiders/kijetesantakaluotokieni.git
synced 2024-11-22 09:50:25 +01:00
fixed trailing spaces on list command
This commit is contained in:
parent
2a3b4cceee
commit
007b5447a3
1 changed files with 10 additions and 6 deletions
16
src/main.rs
16
src/main.rs
|
@ -35,9 +35,7 @@ fn main() {
|
||||||
match critters::list_files() {
|
match critters::list_files() {
|
||||||
Err(e) => println!("{}", e),
|
Err(e) => println!("{}", e),
|
||||||
Ok(files) => {
|
Ok(files) => {
|
||||||
for file in files {
|
print!("{}", files.join(" "))
|
||||||
print!("{} ", file)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -64,7 +62,7 @@ struct Args {
|
||||||
ijo: Option<String>,
|
ijo: Option<String>,
|
||||||
|
|
||||||
#[clap(short = 'i', long, help = "o ante e palisa pi poki toki")]
|
#[clap(short = 'i', long, help = "o ante e palisa pi poki toki")]
|
||||||
palisa: Option<String>,
|
linja: Option<String>,
|
||||||
|
|
||||||
#[clap(short = 'u', long, help = "o ante e poki toki")]
|
#[clap(short = 'u', long, help = "o ante e poki toki")]
|
||||||
poki: Option<String>,
|
poki: Option<String>,
|
||||||
|
@ -90,7 +88,7 @@ struct Args {
|
||||||
seme: bool,
|
seme: bool,
|
||||||
|
|
||||||
// implementation of classic cowsay flags
|
// implementation of classic cowsay flags
|
||||||
#[clap(short = 'b', long)]
|
#[clap(short = 'b', long = "o-sama")]
|
||||||
ilo: bool,
|
ilo: bool,
|
||||||
|
|
||||||
#[clap(short = 'd', long)]
|
#[clap(short = 'd', long)]
|
||||||
|
@ -114,6 +112,9 @@ struct Args {
|
||||||
#[clap(short = 'y', long)]
|
#[clap(short = 'y', long)]
|
||||||
lili: bool,
|
lili: bool,
|
||||||
|
|
||||||
|
#[clap(short = 'z', long)]
|
||||||
|
suwi: bool,
|
||||||
|
|
||||||
#[clap(short = 'I', long)]
|
#[clap(short = 'I', long)]
|
||||||
pilin: bool,
|
pilin: bool,
|
||||||
|
|
||||||
|
@ -125,7 +126,7 @@ impl Args {
|
||||||
fn configs_from_arguments(&self) -> Result<(CritterConfig, BubbleConfig), String> {
|
fn configs_from_arguments(&self) -> Result<(CritterConfig, BubbleConfig), String> {
|
||||||
let mut eyes = self.lukin.clone();
|
let mut eyes = self.lukin.clone();
|
||||||
let mut tongue = self.uta.clone();
|
let mut tongue = self.uta.clone();
|
||||||
let mut line = self.palisa.clone();
|
let mut line = self.linja.clone();
|
||||||
let object = self.ijo.clone();
|
let object = self.ijo.clone();
|
||||||
let mut format = if self.kule.is_empty() {
|
let mut format = if self.kule.is_empty() {
|
||||||
kule::reset()
|
kule::reset()
|
||||||
|
@ -154,6 +155,8 @@ impl Args {
|
||||||
eyes = Some("OO".to_string());
|
eyes = Some("OO".to_string());
|
||||||
} else if self.lili {
|
} else if self.lili {
|
||||||
eyes = Some("..".to_string());
|
eyes = Some("..".to_string());
|
||||||
|
} else if self.suwi {
|
||||||
|
eyes = Some("^^".to_string());
|
||||||
}
|
}
|
||||||
if self.pilin {
|
if self.pilin {
|
||||||
line = Some("oOo".to_string());
|
line = Some("oOo".to_string());
|
||||||
|
@ -221,6 +224,7 @@ impl Args {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"suli" => Formats::Bright.escape(false),
|
"suli" => Formats::Bright.escape(false),
|
||||||
|
"wawa" => Formats::Bright.escape(false),
|
||||||
"len" => Formats::Dim.escape(false),
|
"len" => Formats::Dim.escape(false),
|
||||||
"mamamije" => Formats::Italic.escape(false),
|
"mamamije" => Formats::Italic.escape(false),
|
||||||
"sike" => Formats::Blink.escape(false),
|
"sike" => Formats::Blink.escape(false),
|
||||||
|
|
Loading…
Reference in a new issue