Allow editing multiline prompts with external text editor #429

Merged
lunny merged 5 commits from noerw/tea:preferences-editor into master 2021-10-14 14:36:09 +00:00
Showing only changes of commit 623afd84bc - Show all commits

View File

@ -17,9 +17,15 @@ import (
"gopkg.in/yaml.v2"
)
type Preferences struct {
// Prefer using an external text editor over inline multiline prompts
Editor bool `yaml:"editor"`
}
// LocalConfig represents local configurations
type LocalConfig struct {
Logins []Login `yaml:"logins"`
Logins []Login `yaml:"logins"`
Prefs Preferences `yaml:"preferences"`
}
var (
@ -55,6 +61,10 @@ func GetConfigPath() string {
return configFilePath
}
func GetPreferences() Preferences {
return config.Prefs
}
// loadConfig load config from file
func loadConfig() (err error) {
loadConfigOnce.Do(func() {