Skip to content

Show the program's name in help output - #119

Merged
jonhadfield merged 1 commit into
mainfrom
fix/help-name
Sep 21, 2026
Merged

jonhadfield merged 1 commit into
mainfrom
fix/help-name

Conversation

@jonhadfield

Copy link
Copy Markdown
Owner

app.HelpName was set to "-", so help called the command - everywhere:

NAME:
   - - Standard Notes CLI

USAGE:
   - [global options] command [command options]

Subcommands inherited it, so sn add --help read - add - add items. The README tells a new user to run sn --help as their first step, which made this the first thing they saw.

Deleting the line lets urfave/cli default HelpName to app.Name, which is already "sn":

NAME:
   sn - Standard Notes CLI

USAGE:
   sn [global options] command [command options]

and sn add --help now reads sn add - add items.

Nothing referenced HelpName anywhere else. go build, go vet and go test ./... pass; verified by building both versions and comparing their output.

🤖 Generated with Claude Code

app.HelpName was set to '-', so every help screen called the command
'-': 'NAME: - - Standard Notes CLI', 'USAGE: - [global options]', and
the same for each subcommand's help. The README's first instruction is
sn --help, so this was the first thing a new user saw.

Removing the line lets urfave/cli default HelpName to app.Name, which
is already 'sn'.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 21, 2026 17:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The change is minimal, scoped to help output naming, and no remaining references or behavioral risks were found in the updated code.

Review effort: Lite
Findings: None

What changed in this PR

Removes an explicit app.HelpName = "-" override so urfave/cli help output uses the application name (app.Name, already set to "sn") rather than displaying - for the program and subcommands.

Changes:

  • Deleted the app.HelpName = "-" assignment to allow the default help naming behavior.
  • As a result, sn --help and subcommand help (sn add --help, etc.) display the correct program name.
File Description
cmd/​sncli/​main.go Removes the HelpName override so help output reflects app.Name (sn).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🟢 Coverage ∅ diff coverage · +0.00% coverage variation

Metric Results
Coverage variation ✅ +0.00% coverage variation (-1.00%)
Diff coverage ✅ ∅ diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (10a5e38) 8826 899 10.19%
Head commit (7119ab8) 8825 (-1) 899 (+0) 10.19% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#119) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@jonhadfield
jonhadfield merged commit 55e311e into main Sep 21, 2026
10 checks passed
@jonhadfield
jonhadfield deleted the fix/help-name branch September 21, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants