readline icon indicating copy to clipboard operation
readline copied to clipboard

Fixed a small bug that prevented the terminal from playing Bell sound when a command's autocompletion was not found

Open h3r0cybersec opened this issue 3 months ago • 0 comments

Normally in bash, when you type an 'xyz' command and it isn't recognized, pressing the TAB key causes a bell to sound. The logic for this is handled within the library, but on line 90 of the file: complete.go:

complete.go
...
newLines, offset := o.op.cfg.AutoComplete.Do(rs, buf.idx)
	if len(newLines) == 0 {
		o.ExitCompleteMode(false)
		return true
	}
...

it returns "true" despite no autocompletion options being found. This pull fixes this error.

h3r0cybersec avatar Sep 22 '25 09:09 h3r0cybersec