mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-05 03:17:50 +08:00
Replace "LS_COLORS" literals with a constant
This commit is contained in:
parent
b9d515dd78
commit
e04c503431
|
@ -50,7 +50,7 @@ func GetColorist() Colorist {
|
|||
}
|
||||
|
||||
func getLsColors() string {
|
||||
lsColorString := os.Getenv("LS_COLORS")
|
||||
lsColorString := os.Getenv(util.EnvLS_COLORS)
|
||||
if len(lsColorString) == 0 {
|
||||
return defaultLsColorString
|
||||
}
|
||||
|
|
|
@ -6,9 +6,10 @@ package util
|
|||
// Note that some of these env vars may be significant only in special
|
||||
// circumstances; such as when running unit tests.
|
||||
const (
|
||||
EnvHOME = "HOME"
|
||||
EnvPATH = "PATH"
|
||||
EnvPATHEXT = "PATHEXT"
|
||||
EnvPWD = "PWD"
|
||||
EnvSHLVL = "SHLVL"
|
||||
EnvHOME = "HOME"
|
||||
EnvPATH = "PATH"
|
||||
EnvPATHEXT = "PATHEXT"
|
||||
EnvPWD = "PWD"
|
||||
EnvSHLVL = "SHLVL"
|
||||
EnvLS_COLORS = "LS_COLORS"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user