seankhl / fzf-mksh

mksh files for junegunn's fzf
13 stars 1 forks source link

make tab completion case insensitive #2

Open siduck opened 3 years ago

siduck commented 3 years ago

Making tab completion case insensitive so it'll match the results well!

siduck commented 3 years ago

on bash I just have to add this

$include /etc/inputrc
set completion-ignore-case On
set completion-ignore-case On

in ~/.inputrc and the tab completion gets case insensitive

seankhl commented 3 years ago

mksh doesn't have any built-in options to make completion or globbing case-insensitive. There are some workarounds, but it requires a decent amount of reworking of the code. I've been a bit busy, but I will get to this.

You can try feat-case-insensitive, but it's not perfect. It leverages the "query" option in FZF, it'll be easier to see the differences if you try it out. But it won't work in all cases, in particular when there's exactly one case-sensitive autocompletion candidate, it will take it without considering case-insensitive alternatives. But if there's 2 or more candidates, it should work properly whether you type capital or lowercase letters.