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