mirror of
				https://github.com/sammy-ette/Hilbish
				synced 2025-08-10 02:52:03 +00:00 
			
		
		
		
	style: add spaces between binary ops and rename appendpath function to be camelCase
This commit is contained in:
		
							parent
							
								
									345ff65da8
								
							
						
					
					
						commit
						d551d0f2ab
					
				
							
								
								
									
										6
									
								
								lua.go
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								lua.go
									
									
									
									
									
								
							@ -27,7 +27,7 @@ func LuaInit(confpath string) {
 | 
			
		||||
	l.SetGlobal("prompt", l.NewFunction(hshprompt))
 | 
			
		||||
	l.SetGlobal("multiprompt", l.NewFunction(hshmlprompt))
 | 
			
		||||
	l.SetGlobal("alias", l.NewFunction(hshalias))
 | 
			
		||||
	l.SetGlobal("appendpath", l.NewFunction(hsappendpath))
 | 
			
		||||
	l.SetGlobal("appendPath", l.NewFunction(hshappendPath))
 | 
			
		||||
 | 
			
		||||
	// Add fs module to Lua
 | 
			
		||||
	l.PreloadModule("fs", lfs.Loader)
 | 
			
		||||
@ -101,10 +101,10 @@ func hshalias(L *lua.LState) int {
 | 
			
		||||
	return 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func hsappendpath(L *lua.LState) int {
 | 
			
		||||
func hshappendPath(L *lua.LState) int {
 | 
			
		||||
	path := L.ToString(1)
 | 
			
		||||
 | 
			
		||||
	os.Setenv("PATH", os.Getenv("PATH")+":"+path)
 | 
			
		||||
	os.Setenv("PATH", os.Getenv("PATH") + ":" + path)
 | 
			
		||||
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user