rewrite barnard-ui in Python
Replace the shell implementation with Python while keeping the same dialog-based interface and the same file layout under ~/.config/barnard. The shell version parsed servers.conf with string operations that lost whitespace and silently discarded entries it could not read, and every new feature meant more quoting and subshell handling. Refuse to start on a servers.conf we cannot interpret. Unknown keys, stray sections, and invalid ports now name the file and line instead of being dropped and rewritten over the top of the user's file. Duplicate server names are reported rather than silently collapsed. Keep a backup of the previous server list and flush it to disk. A save is written to a temporary file, the old one is copied to .bak, and both the file and its directory are synced before the replace. Confirm before overwriting or removing a server. Bracket IPv6 addresses when building the -server argument. The shell version joined address and port with a colon, which is not a usable address for an IPv6 literal. Take the hostname from os.uname rather than the environment. HOSTNAME is a shell variable and is not exported, so the connect username lost its host part. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
e64c6df2b7
commit
0c8eec1bf6
+874
-517
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user