mirror of https://github.com/Hilbis/Hilbish
fix: add commonRequirePaths and linuxUserPaths to avoid repetition with custom require paths
parent
3d53e85fc9
commit
7a3d9022e9
1
vars.go
1
vars.go
|
@ -5,6 +5,7 @@ var (
|
||||||
version = "v0.5.1"
|
version = "v0.5.1"
|
||||||
defaultConfDir = "" // ~ will be substituted for home, path for user's default config
|
defaultConfDir = "" // ~ will be substituted for home, path for user's default config
|
||||||
defaultHistDir = ""
|
defaultHistDir = ""
|
||||||
|
commonRequirePaths = "';./libs/?/init.lua;./?/init.lua;./?/?.lua'"
|
||||||
|
|
||||||
prompt string // Prompt will always get changed anyway
|
prompt string // Prompt will always get changed anyway
|
||||||
multilinePrompt = "> "
|
multilinePrompt = "> "
|
||||||
|
|
|
@ -4,9 +4,10 @@ package main
|
||||||
|
|
||||||
// String vars that are free to be changed at compile time
|
// String vars that are free to be changed at compile time
|
||||||
var (
|
var (
|
||||||
requirePaths = `';./libs/?/?.lua;./libs/?/init.lua;./?/init.lua;./?/?.lua'
|
requirePaths = commonRequirePaths + `
|
||||||
.. ';/usr/share/hilbish/libs/?/init.lua;'
|
.. ';/usr/share/hilbish/libs/?/init.lua;'
|
||||||
.. ';/usr/share/hilbish/libs/?/?.lua;'
|
.. ';/usr/share/hilbish/libs/?/?.lua;'` + linuxUserPaths
|
||||||
|
linuxUserPaths = `
|
||||||
.. hilbish.xdg.data .. '/hilbish/libs/?/init.lua;'
|
.. hilbish.xdg.data .. '/hilbish/libs/?/init.lua;'
|
||||||
.. hilbish.xdg.data .. '/hilbish/libs/?/?.lua;'
|
.. hilbish.xdg.data .. '/hilbish/libs/?/?.lua;'
|
||||||
.. hilbish.xdg.data .. '/hilbish/libs/?.lua'
|
.. hilbish.xdg.data .. '/hilbish/libs/?.lua'
|
||||||
|
|
|
@ -4,7 +4,7 @@ package main
|
||||||
|
|
||||||
// String vars that are free to be changed at compile time
|
// String vars that are free to be changed at compile time
|
||||||
var (
|
var (
|
||||||
requirePaths = `';./libs/?/init.lua;./?/init.lua;./?/?.lua'
|
requirePaths = commonRequirePaths + `
|
||||||
.. hilbish.home .. '\\Appdata\\Roaming\\Hilbish\\libs\\?\\init.lua;'
|
.. hilbish.home .. '\\Appdata\\Roaming\\Hilbish\\libs\\?\\init.lua;'
|
||||||
.. hilbish.home .. '\\Appdata\\Roaming\\Hilbish\\libs\\?\\?.lua;'`
|
.. hilbish.home .. '\\Appdata\\Roaming\\Hilbish\\libs\\?\\?.lua;'`
|
||||||
dataDir = "~\\Appdata\\Roaming\\Hilbish" // ~ and \ gonna cry?
|
dataDir = "~\\Appdata\\Roaming\\Hilbish" // ~ and \ gonna cry?
|
||||||
|
|
Loading…
Reference in New Issue