Gitfed
bastien-mrq/sssh/ Commits/ b49f10c

fix(tui): aide compacte pour que le raccourci i soit visible

Libellés courts et français, i placé juste après entrée, touches custom aussi dans l'aide complète (?). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

bastien-mrq 2026-08-13 09:52 commit b49f10caaf52b557414b4cf360092fe5c36301dc parent f90923adafc4f0d875607cd6f5f7caf28d156433
2 files changed +17 −6
M internal/tui/list.go +17 −6
M vhs/demo.gif Binary file — not shown.
internal/tui/list.go
diff --git a/internal/tui/list.go b/internal/tui/list.go index 03bb2f6..f24babc 100644 --- a/internal/tui/list.go +++ b/internal/tui/list.go @@ -112,15 +112,26 @@ func Run(hosts []host.Host, canImportSSH bool) (Result, error) { l := list.New(items, list.NewDefaultDelegate(), 0, 0) l.Title = "sssh" l.SetStatusBarItemName("host", "hosts") - l.AdditionalShortHelpKeys = func() []key.Binding { + + // Libellés compacts (et en français) pour que toute l'aide, touche i + // comprise, tienne sur une ligne en 80 colonnes. + l.KeyMap.CursorUp.SetHelp("↑", "haut") + l.KeyMap.CursorDown.SetHelp("↓", "bas") + l.KeyMap.Filter.SetHelp("/", "filtre") + l.KeyMap.Quit.SetHelp("q", "quitter") + l.KeyMap.ShowFullHelp.SetHelp("?", "aide") + l.KeyMap.CloseFullHelp.SetHelp("?", "fermer l'aide") + extraKeys := func() []key.Binding { return []key.Binding{ - key.NewBinding(key.WithKeys("enter"), key.WithHelp("entrée", "connexion")), - key.NewBinding(key.WithKeys("a"), key.WithHelp("a", "ajouter")), - key.NewBinding(key.WithKeys("e"), key.WithHelp("e", "éditer")), - key.NewBinding(key.WithKeys("d"), key.WithHelp("d", "supprimer")), - key.NewBinding(key.WithKeys("i"), key.WithHelp("i", "importer ssh_config")), + key.NewBinding(key.WithKeys("enter"), key.WithHelp("↵", "ssh")), + key.NewBinding(key.WithKeys("i"), key.WithHelp("i", "import")), + key.NewBinding(key.WithKeys("a"), key.WithHelp("a", "ajout")), + key.NewBinding(key.WithKeys("e"), key.WithHelp("e", "édite")), + key.NewBinding(key.WithKeys("d"), key.WithHelp("d", "suppr")), } } + l.AdditionalShortHelpKeys = extraKeys + l.AdditionalFullHelpKeys = extraKeys p := tea.NewProgram(model{list: l, canImportSSH: canImportSSH}, tea.WithAltScreen()) out, err := p.Run()
vhs/demo.gif
diff --git a/vhs/demo.gif b/vhs/demo.gif index 031b749..f0dbf43 100644 Binary files a/vhs/demo.gif and b/vhs/demo.gif differ