merge: combine zoxide and Atuin context navigation
# Conflicts: # README.md # internal/config/config.go # internal/config/config_test.go # root/config_cmd.go # root/config_cmd_test.go # root/init.go
This commit is contained in:
@@ -83,6 +83,11 @@ type ZoxideConfig struct {
|
||||
ExtendCd bool `toml:"extend-cd"`
|
||||
}
|
||||
|
||||
type HistoryConfig struct {
|
||||
// Scope controls Atuin filtering for non-empty history searches.
|
||||
Scope string `toml:"scope"`
|
||||
}
|
||||
|
||||
type SuggestOnEmptyConfig struct {
|
||||
Enabled bool `toml:"enabled"`
|
||||
DebounceMS int `toml:"debounce_ms"`
|
||||
@@ -130,6 +135,7 @@ type Config struct {
|
||||
Core CoreConfig `toml:"core"`
|
||||
UI UIConfig `toml:"ui"`
|
||||
Git GitConfig `toml:"git"`
|
||||
History HistoryConfig `toml:"history"`
|
||||
Updater UpdaterConfig `toml:"updater"`
|
||||
AI AIConfig `toml:"ai"`
|
||||
Zoxide ZoxideConfig `toml:"zoxide"`
|
||||
@@ -288,6 +294,11 @@ func validate(cfg *Config) error {
|
||||
return fmt.Errorf("core.shell: invalid value %q (want: bash|zsh|fish)", cfg.Core.Shell)
|
||||
}
|
||||
|
||||
validHistoryScopes := map[string]bool{"global": true, "directory": true, "workspace": true, "hybrid": true}
|
||||
if !validHistoryScopes[cfg.History.Scope] {
|
||||
return fmt.Errorf("history.scope: invalid value %q (want: global|directory|workspace|hybrid)", cfg.History.Scope)
|
||||
}
|
||||
|
||||
validChannels := map[string]bool{"stable": true, "nightly": true}
|
||||
if !validChannels[cfg.Updater.Channel] {
|
||||
return fmt.Errorf("updater.channel: invalid value %q (want: stable|nightly)", cfg.Updater.Channel)
|
||||
|
||||
Reference in New Issue
Block a user