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 organized
windows-fixes
TorchedSammy 2022-02-26 12:12:59 -04:00
parent 21b093559a
commit 0b5bbcc73c
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
3 changed files with 0 additions and 17 deletions

View File

@ -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
View File

@ -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")
}
}

View File

@ -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