[FEAT] Prompt for an entry's own tags on new #1

Merged
TomPlanche merged 2 commits from feat/prompt-tags into main 2026-09-02 18:18:18 +02:00
TomPlanche commented 2026-09-02 18:16:40 +02:00 (Migrated from github.com)

default_tags describes a folder. It cannot say what one entry is about.

Set prompt_tags = true on a folder, and selfnotes new asks for tags after the folder fields.

$ selfnotes new ticket login-bug
Ticket's link: https://example.atlassian.net/browse/INT-42
Tags (comma-separated): auth,bug/login
+++
link = "https://example.atlassian.net/browse/INT-42"
status = "todo"
tags = ["ticket", "auth", "bug/login"]
+++

The answer is one comma-separated line. It drops empty entries and repeats, and it removes a leading #. The tags join the folder's default_tags, never replace them. --tag auth,bug/login passes the same tags without the prompt, which keeps the folder usable from an editor task.

The key defaults to false, and a folder overrides the top level in both directions. The journal never asks.

write_entry now seeds the status before the tags. Seeding tags re-serializes the frontmatter table, which sorts the keys, so a status used to land after the block instead of inside it.

`default_tags` describes a folder. It cannot say what one entry is about. Set `prompt_tags = true` on a folder, and `selfnotes new` asks for tags after the folder fields. ``` $ selfnotes new ticket login-bug Ticket's link: https://example.atlassian.net/browse/INT-42 Tags (comma-separated): auth,bug/login ``` ```toml +++ link = "https://example.atlassian.net/browse/INT-42" status = "todo" tags = ["ticket", "auth", "bug/login"] +++ ``` The answer is one comma-separated line. It drops empty entries and repeats, and it removes a leading `#`. The tags join the folder's `default_tags`, never replace them. `--tag auth,bug/login` passes the same tags without the prompt, which keeps the folder usable from an editor task. The key defaults to false, and a folder overrides the top level in both directions. The journal never asks. `write_entry` now seeds the status before the tags. Seeding tags re-serializes the frontmatter table, which sorts the keys, so a status used to land after the block instead of inside it.
Sign in to join this conversation.
No description provided.