Skip to content

Conversation

@TheYkk
Copy link
Owner

@TheYkk TheYkk commented Jun 2, 2025

This commit introduces a new 'list' subcommand to the git-switcher CLI.

The 'list' command allows you to:

  • View all saved git configuration profiles stored in ~/.config/gitconfigs.
  • Quickly identify the currently active git profile, which is highlighted in the output.

The implementation includes:

  • A new 'cmd/list.go' file for the 'list' subcommand logic.
  • Registration of the 'list' command in 'cmd/root.go'.
  • Removal of the interactive profile listing from the root command's default action; you are now guided to use 'git-switcher switch' for interactive mode or 'git-switcher list' for listing.
  • Unit tests for the 'list' command in 'cmd/list_test.go', covering various scenarios like basic listing, current profile indication, and no profiles.
  • Updated 'README.md' to include documentation for the new 'list' command.

This commit introduces a new 'list' subcommand to the git-switcher CLI.

The 'list' command allows you to:
- View all saved git configuration profiles stored in ~/.config/gitconfigs.
- Quickly identify the currently active git profile, which is highlighted in the output.

The implementation includes:
- A new 'cmd/list.go' file for the 'list' subcommand logic.
- Registration of the 'list' command in 'cmd/root.go'.
- Removal of the interactive profile listing from the root command's default action; you are now guided to use 'git-switcher switch' for interactive mode or 'git-switcher list' for listing.
- Unit tests for the 'list' command in 'cmd/list_test.go', covering various scenarios like basic listing, current profile indication, and no profiles.
- Updated 'README.md' to include documentation for the new 'list' command.
This commit removes commented-out code and unnecessary explanatory
comments from the cmd/root.go file.

The changes aim to improve code clarity and readability by removing
clutter that is no longer relevant to the current state of the codebase.
Valuable comments explaining the purpose of key components have been
retained.
This commit removes artifact comments, such as '// Removed unused import'
and other development remnants, from various .go files.

These changes improve the overall cleanliness and readability of the
codebase by removing comments that were left behind by automated
tooling or during previous development stages and serve no current
documentary purpose.
@TheYkk TheYkk closed this Jun 2, 2025
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