rewrite ssh config parser and writer to protect file

This commit is contained in:
Adem Baccara
2025-09-10 21:10:10 +01:00
parent 78c660dc59
commit b71ef74aaa
14 changed files with 772 additions and 575 deletions
+3 -6
View File
@@ -14,13 +14,10 @@
package ui
import "time"
const (
AppName = "lazyssh"
RepoURL = "github.com/adembc/lazyssh"
SplashScreenDuration = 1 * time.Second
Banner = `
AppName = "lazyssh"
RepoURL = "github.com/adembc/lazyssh"
Banner = `
$$\ $$\
$$ | $$ |
+1 -1
View File
@@ -72,7 +72,7 @@ func (sd *ServerDetails) UpdateServer(server domain.Server) {
tagsText := renderTagChips(server.Tags)
text := fmt.Sprintf(
"[::b]%s[-]\n\nHost: [white]%s[-]\nUser: [white]%s[-]\nPort: [white]%d[-]\nKey: [white]%s[-]\nTags: %s\nPinned: [white]%s[-]\nLast SSH: %s\nSSH Count: [white]%d[-]\n\n[::b]Commands:[-]\n Enter: SSH connect\n c: Copy SSH command\n g: Ping server\n r: Refresh list\n a: Add new server\n e: Edit entry\n t: Edit tags\n d: Delete entry\n p: Pin/Unpin",
server.Alias, server.Host, server.User, server.Port,
strings.Join(server.Aliases, ", "), server.Host, server.User, server.Port,
serverKey, tagsText, pinnedStr,
lastSeen, server.SSHCount)
sd.TextView.SetText(text)