mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-31 22:36:41 -04:00
Support passphrase-protected SSH identity files on non-CLI clients
This commit is contained in:
+8
-5
@@ -4,16 +4,19 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
type ByteInputFetcher func(prompt string) []byte
|
||||
|
||||
var (
|
||||
Home, _ = os.UserHomeDir()
|
||||
PassphraseInputFunction ByteInputFetcher // Clients should set this to a function that fetches hidden input from the user
|
||||
Home, _ = os.UserHomeDir()
|
||||
)
|
||||
|
||||
const (
|
||||
LibmuttonVersion = "0.2.F" // untagged releases feature a letter suffix corresponding to the eventual release version, e.g "0.2.A" -> "0.2.0", "0.2.B" -> "0.2.1"
|
||||
LibmuttonVersion = "0.2.F" // Untagged releases feature a letter suffix corresponding to the eventual release version, e.g "0.2.A" -> "0.2.0", "0.2.B" -> "0.2.1"
|
||||
|
||||
FSSpace = "\u259d" // ▝ space/list separator
|
||||
FSPath = "\u259e" // ▞ path separator
|
||||
FSMisc = "\u259f" // ▟ misc. field separator (if \u259d is already used)
|
||||
FSSpace = "\u259d" // ▝ Space/list separator
|
||||
FSPath = "\u259e" // ▞ Path separator
|
||||
FSMisc = "\u259f" // ▟ Misc. field separator (if \u259d is already used)
|
||||
|
||||
AnsiError = "\033[38;5;9m"
|
||||
AnsiReset = "\033[0m"
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
package core
|
||||
|
||||
var EntryRoot = Home + "/.local/share/libmutton" // path to libmutton entry directory
|
||||
var ConfigDir = Home + "/.config/libmutton" // path to libmutton configuration directory
|
||||
var ConfigPath = ConfigDir + "/libmutton.ini" // path to libmutton configuration file
|
||||
var EntryRoot = Home + "/.local/share/libmutton" // Path to libmutton entry directory
|
||||
var ConfigDir = Home + "/.config/libmutton" // Path to libmutton configuration directory
|
||||
var ConfigPath = ConfigDir + "/libmutton.ini" // Path to libmutton configuration file
|
||||
|
||||
const (
|
||||
PathSeparator = "/" // platform-specific path separator
|
||||
IsWindows = false // platform indicator
|
||||
PathSeparator = "/" // Platform-specific path separator
|
||||
IsWindows = false // Platform indicator
|
||||
)
|
||||
|
||||
// enableVirtualTerminalProcessing is a dummy function on UNIX-like systems (only needed on Windows).
|
||||
|
||||
+5
-5
@@ -7,13 +7,13 @@ import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
var EntryRoot = Home + "\\AppData\\Local\\libmutton\\entries" // path to libmutton entry directory
|
||||
var ConfigDir = Home + "\\AppData\\Local\\libmutton\\config" // path to libmutton configuration directory
|
||||
var ConfigPath = ConfigDir + "\\libmutton.ini" // path to libmutton configuration file
|
||||
var EntryRoot = Home + "\\AppData\\Local\\libmutton\\entries" // Path to libmutton entry directory
|
||||
var ConfigDir = Home + "\\AppData\\Local\\libmutton\\config" // Path to libmutton configuration directory
|
||||
var ConfigPath = ConfigDir + "\\libmutton.ini" // Path to libmutton configuration file
|
||||
|
||||
const (
|
||||
PathSeparator = "\\" // platform-specific path separator
|
||||
IsWindows = true // platform indicator
|
||||
PathSeparator = "\\" // Platform-specific path separator
|
||||
IsWindows = true // Platform indicator
|
||||
)
|
||||
|
||||
// enableVirtualTerminalProcessing ensures ANSI escape sequences are interpreted properly on Windows.
|
||||
|
||||
Reference in New Issue
Block a user