|
|
|
@ -84,19 +84,23 @@ func SetLocal(items []string) error {
|
|
|
|
|
func LoadSloshFiles() error { |
|
|
|
|
alias = map[string]CommandLine{} |
|
|
|
|
if IsLoginShell { |
|
|
|
|
sloshSysProfile := filepath.Join("/etc", "slosh") |
|
|
|
|
lines, err := getRcLines(sloshSysProfile) |
|
|
|
|
if err == nil { |
|
|
|
|
parseRcLines(lines) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
loginSloshFile := filepath.Join(HomeDir(), ".slosh") |
|
|
|
|
lines, err := getRcLines(loginSloshFile) |
|
|
|
|
if err != nil { |
|
|
|
|
return err |
|
|
|
|
lines, err = getRcLines(loginSloshFile) |
|
|
|
|
if err == nil { |
|
|
|
|
parseRcLines(lines) |
|
|
|
|
} |
|
|
|
|
parseRcLines(lines) |
|
|
|
|
} |
|
|
|
|
interactiveSloshFile := filepath.Join(HomeDir(), ".sloshrc") |
|
|
|
|
lines, err := getRcLines(interactiveSloshFile) |
|
|
|
|
if err != nil { |
|
|
|
|
return err |
|
|
|
|
if err == nil { |
|
|
|
|
parseRcLines(lines) |
|
|
|
|
} |
|
|
|
|
parseRcLines(lines) |
|
|
|
|
return nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|