···1+DO THE THING
2+3+4+remember to do part1
5+6+and part2
7+8+and part3
+3-3
.tsk/index
···1-tsk-30 Add flag to only print IDs in list command 1735007126
2tsk-28 Add tool to clean up old tasks not in index 1735006519
3tsk-10 foreign workspaces 1732594198
4tsk-21 Add command to setup git stuff 1732594198
5-tsk-8 IMAP4-based sync 1732594198
6tsk-17 Add reopen command 1732594198
7-tsk-16 Add ability to search archived tasks with find command 1732594198
8tsk-15 Add link identification to tasks 1732594198
9tsk-9 fix timestamp storage and parsing 1732594198
10tsk-7 allow for creating tasks that don't go to top of stack 1732594198
···1+tsk-30 Add flag to only print IDs in list command 1763257109
2tsk-28 Add tool to clean up old tasks not in index 1735006519
3tsk-10 foreign workspaces 1732594198
4tsk-21 Add command to setup git stuff 1732594198
5+tsk-8 IMAP4-based sync 1767469318
6tsk-17 Add reopen command 1732594198
7+tsk-16 Add ability to search archived tasks with find command 1767466011
8tsk-15 Add link identification to tasks 1732594198
9tsk-9 fix timestamp storage and parsing 1732594198
10tsk-7 allow for creating tasks that don't go to top of stack 1732594198
···184A quick overview of the format:
185186- \!Bolded\! text is surrounded by exclamation marks (!)
187-- \*Italicized\* text is surrouneded by single asterists (*)
188- \_Underlined\_ text is surrounded by underscores (_)
189-- \~Strikenthrough\~ text is surrounded by tildes (~)
00190191Links like in Markdown, along with the wiki-style links documented above.
0192193Misc
194----
···184A quick overview of the format:
185186- \!Bolded\! text is surrounded by exclamation marks (!)
187+- \*Italicized\* text is surrounded by single asterisks (*)
188- \_Underlined\_ text is surrounded by underscores (_)
189+- \~Strikethrough\~ text is surrounded by tildes (~)
190+- \=Highlighted\= text is surrounded by equals signs (=)
191+- \`Inline code\` is surrounded by backticks (`)
192193Links like in Markdown, along with the wiki-style links documented above.
194+Raw links can also be written as \<https://example.com\>.
195196Misc
197----
+19-2
src/main.rs
···313 } else {
314 "".to_string()
315 };
316- let mut body = body.unwrap_or_default();
00000000000000317 if body == "-" {
318 // add newline so you can type directly in the shell
319 //eprintln!("");
···327 body = content.1.to_string();
328 }
329 }
00330 let task = workspace.new_task(title, body)?;
331 workspace.handle_metadata(&task, None)?;
332 Ok(task)
···380 let pre_links = task::parse(&task.to_string()).map(|pt| pt.intenal_links());
381 let new_content = open_editor(format!("{}\n\n{}", task.title.trim(), task.body.trim()))?;
382 if let Some((title, body)) = new_content.split_once("\n") {
383- task.title = title.to_string();
0384 task.body = body.to_string();
385 workspace.handle_metadata(&task, pre_links)?;
386 task.save()?;
···313 } else {
314 "".to_string()
315 };
316+ // If no body was explicitly provided and the title contains newlines,
317+ // treat the first line as the title and the rest as the body (like git commit -m)
318+ let mut body = if body.is_none() {
319+ if let Some((first_line, rest)) = title.split_once('\n') {
320+ let extracted_body = rest.to_string();
321+ title = first_line.to_string();
322+ extracted_body
323+ } else {
324+ String::new()
325+ }
326+ } else {
327+ // Body was explicitly provided, so strip any newlines from title
328+ title = title.replace(['\n', '\r'], " ");
329+ body.unwrap_or_default()
330+ };
331 if body == "-" {
332 // add newline so you can type directly in the shell
333 //eprintln!("");
···341 body = content.1.to_string();
342 }
343 }
344+ // Ensure title never contains newlines (invariant for index file format)
345+ title = title.replace(['\n', '\r'], " ");
346 let task = workspace.new_task(title, body)?;
347 workspace.handle_metadata(&task, None)?;
348 Ok(task)
···396 let pre_links = task::parse(&task.to_string()).map(|pt| pt.intenal_links());
397 let new_content = open_editor(format!("{}\n\n{}", task.title.trim(), task.body.trim()))?;
398 if let Some((title, body)) = new_content.split_once("\n") {
399+ // Ensure title never contains newlines (invariant for index file format)
400+ task.title = title.replace(['\n', '\r'], " ");
401 task.body = body.to_string();
402 workspace.handle_metadata(&task, pre_links)?;
403 task.save()?;