Compare commits

..

2 Commits

Author SHA1 Message Date
TorchedSammy b221921ab7
docs: detail removal of .hprofile.lua 2022-02-26 12:15:03 -04:00
TorchedSammy 0b5bbcc73c
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
2022-02-26 12:14:26 -04:00
4 changed files with 2 additions and 17 deletions

View File

@ -38,6 +38,8 @@ the config path.
- `hilbish.xdg` no longer exists, use `hilbish.userDir` instead,
as it functions the same and is OS agnostic
- `hilbish.flag` has been removed
- `~/.hprofile.lua` has been removed, instead check in your config if `hilbish.login`
is true
## [0.7.1] - 2021-11-22
### Fixed

View File

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

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

View File

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