Skip to content

[FEAT] - Add --help Flag for Command-Line Usage #25

@bakayu

Description

@bakayu

Description:

Currently, there is no way for users to quickly see the available command-line options and usage instructions without launching the TUI. Adding a standard --help flag would improve usability and make the tool more familiar to users of command-line applications.

Current Behavior:

The application does not have a --help or -h flag to display usage information.

Desired Behavior:

When a user runs gitx --help or gitx -h, the application should print a helpful message outlining the available commands and options, and then exit gracefully without launching the main TUI.

Example of Desired Output:

$ gitx --help
gitx - A Git TUI Helper

Usage: gitx [options]

Options:
  -v, --version    Show version information
  -h, --help       Show this help message

Run 'gitx' inside a Git repository to start the TUI.

PR Acceptance Criteria:

  • Implement the --help and -h flags in cmd/gitx/main.go.
  • Running gitx --help or gitx -h must display the usage information as shown above and exit.
  • The application should not launch the TUI when the help or version flags are provided.
  • Attach a screenshot of the terminal output after running the gitx --help command.

Metadata

Metadata

Assignees

Labels

EASYThis bug/feature request is easy to work around.good first issueGood for newcomershacktoberfestIssue is up for grabs for hacktoberfestlanguage/goRequires the knowledge of "Go"

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions