forked from janek/mostr
feat: separate output columns by tabulator
This commit is contained in:
parent
b30994c151
commit
f3110564cd
|
@ -100,6 +100,7 @@ impl Task {
|
|||
"state" => self.state().map(|s| s.to_string()),
|
||||
"name" => Some(self.event.content.clone()),
|
||||
"time" => Some(self.time_tracked().to_string()), // TODO: format properly
|
||||
"props" => Some(format!("{:?}", self.props.iter().map(|e| format!("{} kind {} '{}'", e.created_at, e.kind, e.content)).collect::<Vec<String>>())),
|
||||
"desc" | "description" => self.descriptions().fold(None, |total, s| {
|
||||
Some(match total {
|
||||
None => s,
|
||||
|
|
|
@ -66,7 +66,7 @@ impl Tasks {
|
|||
}
|
||||
|
||||
pub(crate) fn print_current_tasks(&self) {
|
||||
println!("{}", self.properties.join(" "));
|
||||
println!("{}", self.properties.join("\t"));
|
||||
for task in self.current_tasks() {
|
||||
println!(
|
||||
"{}",
|
||||
|
@ -78,7 +78,7 @@ impl Tasks {
|
|||
prop => task.get(prop).unwrap_or(String::new()),
|
||||
})
|
||||
.collect::<Vec<String>>()
|
||||
.join(" ")
|
||||
.join("\t")
|
||||
);
|
||||
}
|
||||
println!();
|
||||
|
|
Loading…
Reference in New Issue