first commit

This commit is contained in:
2025-08-31 22:57:23 +02:00
commit fad2585d5e
19 changed files with 2783 additions and 0 deletions

27
cmd/edit.go Normal file
View File

@@ -0,0 +1,27 @@
package cmd
import (
"fmt"
"sshm/internal/ui"
"github.com/spf13/cobra"
)
var editCmd = &cobra.Command{
Use: "edit <hostname>",
Short: "Edit an existing SSH host configuration",
Long: `Edit an existing SSH host configuration with an interactive form.`,
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
hostname := args[0]
err := ui.RunEditForm(hostname)
if err != nil {
fmt.Printf("Error editing host: %v\n", err)
}
},
}
func init() {
rootCmd.AddCommand(editCmd)
}