mirror of
				https://github.com/sammy-ette/Hilbish
				synced 2025-08-10 02:52:03 +00:00 
			
		
		
		
	feat: add hilbish.cwd function
This commit is contained in:
		
							parent
							
								
									ba6d7972e0
								
							
						
					
					
						commit
						af4b4b2ae0
					
				
							
								
								
									
										10
									
								
								hilbish.go
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								hilbish.go
									
									
									
									
									
								
							@ -14,6 +14,7 @@ import (
 | 
			
		||||
var exports = map[string]lua.LGFunction {
 | 
			
		||||
	"run": run,
 | 
			
		||||
	"flag": flag,
 | 
			
		||||
	"cwd": cwd,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func HilbishLoader(L *lua.LState) int {
 | 
			
		||||
@ -53,3 +54,12 @@ func flag(L *lua.LState) int {
 | 
			
		||||
 | 
			
		||||
	return 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func cwd(L *lua.LState) int {
 | 
			
		||||
	cwd, _ := os.Getwd()
 | 
			
		||||
 | 
			
		||||
	L.Push(lua.LString(cwd))
 | 
			
		||||
 | 
			
		||||
	return 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user