Compare commits

...

2 Commits

Author SHA1 Message Date
Kacper Marzecki
e3d48a09b6 fix remove log file on startup 2025-03-16 23:30:01 +01:00
Kacper Marzecki
5eb0b3618a better help display 2025-03-16 23:18:38 +01:00
2 changed files with 29 additions and 18 deletions

View File

@ -294,23 +294,33 @@ export default function TaskApp() {
execSync("tmux-td")
}
if (input === "1") {
editWithNeovim({ id: randomId(), name: "", completed: false, subtasks: [], content: consoleLog })
}
if (input === "?") {
log("==========================");
log("Keybindings:");
log("j/k - Move up/down");
log("d/u - Move down/up 5 tasks");
log("D - remove task");
log("g/G - Go to top/bottom");
log("h/l - Navigate parent/subtasks");
log("a - Add task");
log("s - Add subtask");
log("e - Edit task in Neovim");
log("S - Sync (Push/Pull)");
log("space - Toggle completion");
log("/ - Search");
log("? - Show help");
log("==========================");
setActiveTabName("console")
setTimeout(() => {
editWithNeovim({
id: randomId(), name: "", completed: false, subtasks: [], content: `
==========================
Keybindings:
j/k - Move up/down
d/u - Move down/up 5 tasks
D - remove task
g/G - Go to top/bottom
h/l - Navigate parent/subtasks
a - Add task
s - Add subtask
e - Edit task in Neovim
S - Sync (Push/Pull)
space - Toggle completion
/ - Search
? - Show help
==========================
` })
}, 100)
}
log("Input:", input);
});

View File

@ -6,8 +6,9 @@ if (!process.env.TD_TASK_DIR) {
}
const TASK_FILE = path.join(process.env.TD_TASK_DIR, "tasks.json");
const LOG_FILE = path.join(process.env.TD_TASK_DIR, "log");
if (fs.existsSync(LOG_FILE)) {
fs.rmSync(LOG_FILE)
}
const ensureIds = (tasks) => {
return tasks.map(task => {