commit d5dc68825f12f5b015daf4df9279ed0b367f628c
parent 71e2d84aaa1ffbf35fc2fa1982390e16ad04c053
Author: Sean Enck <sean@ttypty.com>
Date: Sun, 8 Dec 2024 16:43:52 -0500
rename type
Diffstat:
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/internal/config/env.go b/internal/config/env.go
@@ -37,8 +37,8 @@ type (
isArray bool
expand bool
}
- // EnvironmentCommand are settings that are parsed as shell commands
- EnvironmentCommand struct {
+ // EnvironmentArray are settings that are parsed as shell commands
+ EnvironmentArray struct {
environmentBase
}
// EnvironmentFormatter allows for sending a string into a get request
@@ -98,7 +98,7 @@ func (e EnvironmentString) Get() string {
}
// Get will read (and shlex) the value if set
-func (e EnvironmentCommand) Get() []string {
+func (e EnvironmentArray) Get() []string {
val, ok := store.GetArray(e.Key())
if !ok {
return []string{}
@@ -135,7 +135,7 @@ func (e EnvironmentFormatter) values() (string, []string) {
return strings.ReplaceAll(strings.ReplaceAll(EnvTOTPFormat.Get("%s"), "%25s", "%s"), "&", " \\\n &"), []string{e.allowed}
}
-func (e EnvironmentCommand) values() (string, []string) {
+func (e EnvironmentArray) values() (string, []string) {
return detectedValue, []string{commandArgsExample}
}
@@ -154,7 +154,7 @@ func (e EnvironmentString) toml() (tomlType, string, bool) {
return tomlString, "\"\"", e.expand
}
-func (e EnvironmentCommand) toml() (tomlType, string, bool) {
+func (e EnvironmentArray) toml() (tomlType, string, bool) {
return tomlArray, "[]", true
}
diff --git a/internal/config/vars.go b/internal/config/vars.go
@@ -163,13 +163,13 @@ var (
canDefault: true,
})
// EnvClipCopy allows overriding the clipboard copy command
- EnvClipCopy = environmentRegister(EnvironmentCommand{environmentBase: environmentBase{
+ EnvClipCopy = environmentRegister(EnvironmentArray{environmentBase: environmentBase{
subKey: "COPY_COMMAND",
cat: clipCategory,
desc: "Override the detected platform copy command.",
}})
// EnvClipPaste allows overriding the clipboard paste command
- EnvClipPaste = environmentRegister(EnvironmentCommand{environmentBase: environmentBase{
+ EnvClipPaste = environmentRegister(EnvironmentArray{environmentBase: environmentBase{
subKey: "PASTE_COMMAND",
cat: clipCategory,
desc: "Override the detected platform paste command.",
@@ -298,7 +298,7 @@ Set to '%s' to ignore the set key value`, noKeyMode, IgnoreKeyMode),
canDefault: true,
})
// EnvPasswordGenWordList is the command text to generate the word list
- EnvPasswordGenWordList = environmentRegister(EnvironmentCommand{environmentBase: environmentBase{
+ EnvPasswordGenWordList = environmentRegister(EnvironmentArray{environmentBase: environmentBase{
subKey: "WORDS_COMMAND",
cat: genCategory,
desc: "Command to retrieve the word list to use for password generation (must be split by newline).",