diff --git a/cmd/root.go b/cmd/root.go index f8703c6..ad2263a 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -21,9 +21,14 @@ var configFile string var rootCmd = &cobra.Command{ Use: "sshm", Short: "SSH Manager - A modern SSH connection manager", - Long: `SSH Manager (sshm) is a modern command-line tool for managing SSH connections. -It provides an interactive interface to browse and connect to your SSH hosts -configured in your ~/.ssh/config file.`, + Long: `SSHM is a modern SSH manager for your terminal. + +Main usage: + Running 'sshm' (without arguments) opens the interactive TUI window to browse, search, and connect to your SSH hosts graphically. + +You can also use sshm in CLI mode for direct operations. + +Hosts are read from your ~/.ssh/config file by default.`, Version: version, Run: func(cmd *cobra.Command, args []string) { // If no arguments provided, run interactive mode diff --git a/internal/ui/update.go b/internal/ui/update.go index a7cc10b..a882827 100644 --- a/internal/ui/update.go +++ b/internal/ui/update.go @@ -70,14 +70,14 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, tea.Quit } m.hosts = m.sortHosts(hosts) - + // Reapply search filter if there is one active if m.searchInput.Value() != "" { m.filteredHosts = m.filterHosts(m.searchInput.Value()) } else { m.filteredHosts = m.hosts } - + m.updateTableRows() m.viewMode = ViewList m.addForm = nil @@ -114,14 +114,14 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, tea.Quit } m.hosts = m.sortHosts(hosts) - + // Reapply search filter if there is one active if m.searchInput.Value() != "" { m.filteredHosts = m.filterHosts(m.searchInput.Value()) } else { m.filteredHosts = m.hosts } - + m.updateTableRows() m.viewMode = ViewList m.editForm = nil @@ -248,14 +248,14 @@ func (m Model) handleListViewKeys(msg tea.KeyMsg) (tea.Model, tea.Cmd) { return m, nil } m.hosts = m.sortHosts(hosts) - + // Reapply search filter if there is one active if m.searchInput.Value() != "" { m.filteredHosts = m.filterHosts(m.searchInput.Value()) } else { m.filteredHosts = m.hosts } - + m.updateTableRows() m.deleteMode = false m.deleteHost = ""