mirror of https://github.com/Hilbis/Hilbish
refactor!: remove .hprofile.lua
same reason as not using ~/.hilbishrc.lua, and also the fact that users can now just check if `hilbish.login` is true in their config which is more organizedwindows-fixes
parent
21b093559a
commit
0b5bbcc73c
1
exec.go
1
exec.go
|
@ -19,7 +19,6 @@ func runInput(input string) {
|
||||||
running = true
|
running = true
|
||||||
cmdString := aliases.Resolve(input)
|
cmdString := aliases.Resolve(input)
|
||||||
|
|
||||||
// If alias was found, use command alias
|
|
||||||
hooks.Em.Emit("command.preexec", input, cmdString)
|
hooks.Em.Emit("command.preexec", input, cmdString)
|
||||||
|
|
||||||
// First try to load input, essentially compiling to bytecode
|
// First try to load input, essentially compiling to bytecode
|
||||||
|
|
15
lua.go
15
lua.go
|
@ -72,18 +72,3 @@ func runConfig(confpath string) {
|
||||||
l.DoString(minimalconf)
|
l.DoString(minimalconf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func runLogin() {
|
|
||||||
if _, err := os.Stat(curuser.HomeDir + "/.hprofile.lua"); os.IsNotExist(err) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if !login {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
err := l.DoFile(curuser.HomeDir + "/.hprofile.lua")
|
|
||||||
if err != nil {
|
|
||||||
fmt.Fprintln(os.Stderr, err,
|
|
||||||
"\nAn error has occured while loading your login config!n")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
1
main.go
1
main.go
|
@ -115,7 +115,6 @@ func main() {
|
||||||
|
|
||||||
go handleSignals()
|
go handleSignals()
|
||||||
luaInit()
|
luaInit()
|
||||||
runLogin()
|
|
||||||
// If user's config doesn't exixt,
|
// If user's config doesn't exixt,
|
||||||
if _, err := os.Stat(defaultConfPath); os.IsNotExist(err) && *configflag == defaultConfPath {
|
if _, err := os.Stat(defaultConfPath); os.IsNotExist(err) && *configflag == defaultConfPath {
|
||||||
// Read default from current directory
|
// Read default from current directory
|
||||||
|
|
Loading…
Reference in New Issue