2
3
鏡像自 https://github.com/sammy-ette/Hilbish synced 2025-08-10 02:52:03 +00:00

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
This commit is contained in:
TorchedSammy 2022-02-26 12:12:59 -04:00
父節點 21b093559a
當前提交 0b5bbcc73c
簽署人: sammyette
GPG 金鑰 ID: 904FC49417B44DCD
共有 3 個檔案被更改,包括 0 行新增17 行删除

查看文件

@ -19,7 +19,6 @@ func runInput(input string) {
running = true
cmdString := aliases.Resolve(input)
// If alias was found, use command alias
hooks.Em.Emit("command.preexec", input, cmdString)
// First try to load input, essentially compiling to bytecode

15
lua.go
查看文件

@ -72,18 +72,3 @@ func runConfig(confpath string) {
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")
}
}

查看文件

@ -115,7 +115,6 @@ func main() {
go handleSignals()
luaInit()
runLogin()
// If user's config doesn't exixt,
if _, err := os.Stat(defaultConfPath); os.IsNotExist(err) && *configflag == defaultConfPath {
// Read default from current directory