Initial commit: dial — interactive SSH host picker
A fast, read-only ~/.ssh/config picker that exec's the system ssh client. Includes: static high-contrast picker with recency/frequency/name sort and tag grouping, `dial keygen` (native ed25519/RSA + optional config entry), and an optional offline YubiKey launch gate with one-time recovery codes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
//go:build !windows
|
||||
|
||||
package connect
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// execCommand replaces the current process with the target binary via execve.
|
||||
// This is what makes ssh's tty/ProxyJump/agent-forwarding "just work": dial is
|
||||
// gone, and ssh owns the terminal directly with no wrapping parent.
|
||||
func execCommand(c Command) error {
|
||||
path, err := exec.LookPath(c.Bin)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
argv := append([]string{c.Bin}, c.Args...)
|
||||
return syscall.Exec(path, argv, os.Environ())
|
||||
}
|
||||
Reference in New Issue
Block a user