mirror of https://github.com/Hilbis/Hilbish
feat: support comptime sample conf declaration
parent
13dc0cd857
commit
646cb93dec
4
main.go
4
main.go
|
@ -95,9 +95,9 @@ func main() {
|
|||
input, err := os.ReadFile(".hilbishrc.lua")
|
||||
if err != nil {
|
||||
// If it wasnt found, go to the real sample conf
|
||||
input, err = os.ReadFile("/usr/share/hilbish/.hilbishrc.lua")
|
||||
input, err = os.ReadFile(sampleConfPath)
|
||||
if err != nil {
|
||||
fmt.Println("could not find .hilbishrc.lua or /usr/share/hilbish/.hilbishrc.lua")
|
||||
fmt.Println("could not find .hilbishrc.lua or", sampleConfPath)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
3
vars.go
3
vars.go
|
@ -10,7 +10,8 @@ var (
|
|||
.. os.getenv 'HOME' .. '/.local/share/hilbish/libs/?/?.lua;'
|
||||
.. os.getenv 'HOME' .. '/.local/share/hilbish/libs/?.lua'`
|
||||
preloadPath = "/usr/share/hilbish/preload.lua"
|
||||
defaultConfDir = "" // ~ will be substituted for home
|
||||
defaultConfDir = "" // ~ will be substituted for home, path for user's default config
|
||||
sampleConfPath = "/usr/share/hilbish/.hilbishrc.lua" // Path to default/sample config
|
||||
|
||||
prompt string // Prompt will always get changed anyway
|
||||
multilinePrompt = "> "
|
||||
|
|
Loading…
Reference in New Issue