Load loads the user configuration from the config file. If the config file doesn't exist but a legacy aliases.yaml does, the aliases are migrated to the new config file.
()
| 209 | // If the config file doesn't exist but a legacy aliases.yaml does, |
| 210 | // the aliases are migrated to the new config file. |
| 211 | func Load() (*Config, error) { |
| 212 | return loadFrom(Path(), legacyAliasesPath()) |
| 213 | } |
| 214 | |
| 215 | func loadFrom(configPath, legacyPath string) (*Config, error) { |
| 216 | config, err := readConfig(configPath) |