mirror of
				https://github.com/sammy-ette/Hilbish
				synced 2025-08-10 02:52:03 +00:00 
			
		
		
		
	Compare commits
	
		
			No commits in common. "b65acca9037a5d687a2bfa769c9f8929fbb50543" and "83a2ce38ea57da06ef731062804c67d5ef2c7a8a" have entirely different histories.
		
	
	
		
			b65acca903
			...
			83a2ce38ea
		
	
		
| @ -65,7 +65,6 @@ will be ran on startup | |||||||
| - Message of the day on startup (`hilbish.motd`), mainly intended as quick | - Message of the day on startup (`hilbish.motd`), mainly intended as quick | ||||||
| small news pieces for releases. It is printed by default. To disable it, | small news pieces for releases. It is printed by default. To disable it, | ||||||
| set `hilbish.opts.motd` to false. | set `hilbish.opts.motd` to false. | ||||||
| - `hilbish.rawInput` hook for input from the readline library |  | ||||||
| 
 | 
 | ||||||
| ### Changed | ### Changed | ||||||
| - **Breaking Change:** Upgraded to Lua 5.4. | - **Breaking Change:** Upgraded to Lua 5.4. | ||||||
|  | |||||||
							
								
								
									
										4
									
								
								lua.go
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								lua.go
									
									
									
									
									
								
							| @ -48,10 +48,6 @@ func luaInit() { | |||||||
| 		} | 		} | ||||||
| 	}) | 	}) | ||||||
| 
 | 
 | ||||||
| 	lr.rl.RawInputCallback = func(r []rune) { |  | ||||||
| 		hooks.Em.Emit("hilbish.rawInput", string(r)) |  | ||||||
| 	} |  | ||||||
| 
 |  | ||||||
| 	// Add more paths that Lua can require from | 	// Add more paths that Lua can require from | ||||||
| 	err := util.DoString(l, "package.path = package.path .. " + requirePaths) | 	err := util.DoString(l, "package.path = package.path .. " + requirePaths) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								main.go
									
									
									
									
									
								
							| @ -116,8 +116,8 @@ func main() { | |||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	go handleSignals() | 	go handleSignals() | ||||||
| 	lr = newLineReader("", false) |  | ||||||
| 	luaInit() | 	luaInit() | ||||||
|  | 	lr = newLineReader("", false) | ||||||
| 	// If user's config doesn't exixt, | 	// If user's config doesn't exixt, | ||||||
| 	if _, err := os.Stat(defaultConfPath); os.IsNotExist(err) && *configflag == defaultConfPath { | 	if _, err := os.Stat(defaultConfPath); os.IsNotExist(err) && *configflag == defaultConfPath { | ||||||
| 		// Read default from current directory | 		// Read default from current directory | ||||||
|  | |||||||
| @ -198,8 +198,6 @@ type Instance struct { | |||||||
| 
 | 
 | ||||||
| 	ViModeCallback func(ViMode) | 	ViModeCallback func(ViMode) | ||||||
| 	ViActionCallback func(ViAction, []string) | 	ViActionCallback func(ViAction, []string) | ||||||
| 
 |  | ||||||
| 	RawInputCallback func([]rune) // called on all input |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // NewInstance is used to create a readline instance and initialise it with sane defaults. | // NewInstance is used to create a readline instance and initialise it with sane defaults. | ||||||
|  | |||||||
| @ -94,7 +94,6 @@ func (rl *Instance) Readline() (string, error) { | |||||||
| 
 | 
 | ||||||
| 		rl.skipStdinRead = false | 		rl.skipStdinRead = false | ||||||
| 		r := []rune(string(b)) | 		r := []rune(string(b)) | ||||||
| 		rl.RawInputCallback(r[:i]) |  | ||||||
| 
 | 
 | ||||||
| 		if isMultiline(r[:i]) || len(rl.multiline) > 0 { | 		if isMultiline(r[:i]) || len(rl.multiline) > 0 { | ||||||
| 			rl.multiline = append(rl.multiline, b[:i]...) | 			rl.multiline = append(rl.multiline, b[:i]...) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user