mirror of https://github.com/Hilbis/Hilbish
Fix formatting
parent
b3fe72469e
commit
cf6029ed11
12
main.go
12
main.go
|
@ -36,18 +36,18 @@ var (
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
homedir, _ = os.UserHomeDir()
|
homedir, _ = os.UserHomeDir()
|
||||||
confDir = getenv("XDG_CONFIG_HOME", homedir + "/.config")
|
confDir = getenv("XDG_CONFIG_HOME", homedir + "/.config")
|
||||||
curuser, _ = user.Current()
|
curuser, _ = user.Current()
|
||||||
preloadPath = strings.Replace(preloadPath, "~", homedir, 1)
|
preloadPath = strings.Replace(preloadPath, "~", homedir, 1)
|
||||||
sampleConfPath = strings.Replace(sampleConfPath, "~", homedir, 1)
|
sampleConfPath = strings.Replace(sampleConfPath, "~", homedir, 1)
|
||||||
|
|
||||||
if defaultConfDir == "" {
|
if defaultConfDir == "" {
|
||||||
// we'll add *our* default if its empty (wont be if its changed comptime)
|
// we'll add *our* default if its empty (wont be if its changed comptime)
|
||||||
if _, err := os.Stat(filepath.Join(confDir, "hilbish", "hilbishrc.lua")); os.IsNotExist(err) {
|
if _, err := os.Stat(filepath.Join(confDir, "hilbish", "hilbishrc.lua")); os.IsNotExist(err) {
|
||||||
defaultConfPath = filepath.Join(homedir, "/.hilbishrc.lua")
|
defaultConfPath = filepath.Join(homedir, "/.hilbishrc.lua")
|
||||||
} else {
|
} else {
|
||||||
defaultConfPath = filepath.Join(confDir, "hilbish", "hilbishrc.lua")
|
defaultConfPath = filepath.Join(confDir, "hilbish", "hilbishrc.lua")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// else do ~ substitution
|
// else do ~ substitution
|
||||||
defaultConfPath = filepath.Join(strings.Replace(defaultConfDir, "~", homedir, 1), ".hilbishrc.lua")
|
defaultConfPath = filepath.Join(strings.Replace(defaultConfDir, "~", homedir, 1), ".hilbishrc.lua")
|
||||||
|
|
Loading…
Reference in New Issue