Skip to content

Clean up the CLI --help text (old spt name, typos, missing placeholders) #545

Description

@LargeModGames

What

The help text for playback, play, list and search came over from spotify-tui. Its examples still use the old spt binary name, so they fail when pasted. There are typos ("specied", "ten second forwards"), and lowercase spotify/url/uri should read Spotify/URL/URI. The --format help leaves out %u (URI) and %r (progress), though the defaults use both, and --volume says "(1 - 100)" but 0 works.

Where to look

  • Every help string in src/cli/clap.rs (device_arg, format_arg and the four *_subcommand fns)
  • The placeholders: Format::get_placeholder in src/cli/util.rs

Possible solution

  • pb is still an alias, so spt pb -nnn becomes spotatui pb -nnn.
  • Edit only the text, never the Arg::new("...") ids or --long names. Other code looks those up by string.
  • A \ at a line end also skips the next line's leading spaces, so keep the space before each \.
  • --help (not -h) prints the long text and exits before any config or login, so no Spotify account is needed.

Done when

  • cargo run --no-default-features --features telemetry,tui -- playback --help shows no spt and lists %u and %r.
  • grep -n '\bspt\b\|specied\|(1 - 100)' src/cli/clap.rs prints nothing.
  • cargo fmt --all -- --check, cargo clippy --no-default-features --features telemetry,tui -- -D warnings and cargo test --no-default-features --features telemetry,tui pass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions