Skip to content

Commit

Permalink
list --plain to use ascii instead of emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
jfding committed Nov 6, 2024
1 parent ae6f5b8 commit 645b6cd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/styles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use clap::builder::styling;

pub use crate::conf::*;

// Emoji
pub const CHECKBOX: &str = "󰄗";
pub const CHECKED: &str = "󰄲";
pub const TASKBOX: &str = "󰄹";
Expand All @@ -11,10 +12,12 @@ pub const SCROLLUP: &str = "↥";
pub const SCROLLDOWN: &str = "↧";
pub const SUBTASK: &str = "󱞩";
pub const PROGRESS: &str = "󰓌";
pub const WARN: &str = "󰼈";
pub const WARN: &str = ""; // 󰼈
pub const QUESTION: &str = "󱜹";
pub const ROUTINES: &str = "󰃯";
pub const ROUTINES_PLAIN: &str = "R";
pub const DATESTAMP: &str = "󰴹"; // 󰃵
pub const DATESTAMP_PLAIN: &str = "@";
pub const WEEKLINE: &str = "󰕶";
pub const LOCKED: &str = "󰍁";
// S means Style
Expand Down
4 changes: 3 additions & 1 deletion src/taskbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,9 @@ impl TaskBox {
}

if plain {
if !t.starts_with(PREFIX_SUBT) { println!("{}", &t); }
if !t.starts_with(PREFIX_SUBT) { println!("{}",
&t.replace(ROUTINES, ROUTINES_PLAIN)
.replace(DATESTAMP, DATESTAMP_PLAIN)); }
} else {
println!("{}", msg);
}
Expand Down

0 comments on commit 645b6cd

Please sign in to comment.