From 5cc8ae28cb462d2cb0b7f74dfa5238e62d17eb70 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 17 Feb 2026 12:11:33 +0000 Subject: feat: support multiline descriptions in push-options via \n escape Git push-options are line-based so literal newlines cannot be sent. Users can now write the two-character sequence \n which is decoded into real newlines before publishing. Use \\n for a literal backslash-n. Includes unit tests, integration test, help text, and changelog entry. --- src/bin/ngit/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bin/ngit/cli.rs') diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs index 85c74cd..ade7861 100644 --- a/src/bin/ngit/cli.rs +++ b/src/bin/ngit/cli.rs @@ -8,7 +8,7 @@ use crate::sub_commands; #[command( author, version, - help_template = "{name} {version}\nnostr plugin for git\n - clone a nostr repository, or add as a remote, by using the url format nostr://pub123/identifier\n - remote branches beginning with `pr/` are open PRs from contributors; `ngit list` can be used to view all PRs\n - to open a PR, push a branch with the prefix `pr/` or use `ngit send` for advanced options\n- publish a repository to nostr with `ngit init`\n\n{usage}\n{all-args}" + help_template = "{name} {version}\nnostr plugin for git\n - clone a nostr repository, or add as a remote, by using the url format nostr://npub123/identifier\n - remote branches beginning with `pr/` are open PRs from contributors; `ngit list` can be used to view all PRs\n - to open a PR, push a branch with the prefix `pr/` or use `ngit send` for advanced options\n set title and description via push options:\n git push -o 'title=My PR' -o 'description=line1\\n\\nline2' -u origin pr/branch\n- publish a repository to nostr with `ngit init`\n\n{usage}\n{all-args}" )] #[command(propagate_version = true)] #[allow(clippy::struct_excessive_bools)] -- cgit v1.2.3