aboutsummaryrefslogtreecommitdiff
path: root/cmd.ha
diff options
context:
space:
mode:
Diffstat (limited to 'cmd.ha')
-rw-r--r--cmd.ha16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmd.ha b/cmd.ha
index 6924fa9..3335209 100644
--- a/cmd.ha
+++ b/cmd.ha
@@ -7,7 +7,7 @@ use path;
use os::exec;
use strconv;
use ascii;
-use csv;
+use tsv;
type error = !(!str | io::error | path::error | exec::error | strconv::error);
@@ -40,8 +40,8 @@ const commands: [_]command = [
func = &do,
},
command {
- names = ["c", "csv"],
- func = &csv,
+ names = ["t", "tsv"],
+ func = &tsv,
},
];
@@ -83,11 +83,11 @@ fn show(tasks: []task, a: arguments) (void | task | error) = {
fmt::println(t.content)!;
};
-fn printtaskcsv(t: task, id: size) (void | error) = {
+fn printtasktsv(t: task, id: size) (void | error) = {
const sid = strings::dup(strconv::ztos(id));
defer free(sid);
const spriority = strconv::ztos(t.priority);
- csv::writerecord(os::stdout, [sid, t.name, spriority])!;
+ tsv::writerecord(os::stdout, [sid, t.name, spriority])!;
};
fn printtask(t: task, id: size) (void | error) = {
@@ -155,11 +155,11 @@ fn filter(tasks: []task, a: arguments) (void | task | error) = {
};
};
-fn csv(tasks: []task, a: arguments) (void | task | error) = {
- csv::writerecord(os::stdout, ["id" ,"name", "priority"])!;
+fn tsv(tasks: []task, a: arguments) (void | task | error) = {
+ tsv::writerecord(os::stdout, ["id" ,"name", "priority"])!;
for (let i = 0z; i < len(tasks); i += 1) {
const t = tasks[i];
- printtaskcsv(t, i)?;
+ printtasktsv(t, i)?;
};
};