feat: add info command for JSON host details

Adds a jq-friendly `sshm info` subcommand with host completion and documentation, and makes home directory resolution testable for backup path tests.
This commit is contained in:
David Ibia
2026-01-12 23:53:35 +01:00
parent 58a9e6f40f
commit 7d9b794ceb
6 changed files with 572 additions and 10 deletions

View File

@@ -45,7 +45,7 @@ func TestRootCommandFlags(t *testing.T) {
func TestRootCommandSubcommands(t *testing.T) {
// Test that all expected subcommands are registered
// Note: completion and help are automatically added by Cobra and may not always appear in Commands()
expectedCommands := []string{"add", "edit", "search"}
expectedCommands := []string{"add", "edit", "search", "info"}
commands := RootCmd.Commands()
commandNames := make(map[string]bool)