Chrysostomus / manjaro-zsh-config

Zsh configuration package for manjaro
MIT License
124 stars 52 forks source link

fix: use character classes instead of ranges in matcher-list pattern #40

Closed mozzieongit closed 1 year ago

mozzieongit commented 1 year ago

Hi, completion would insert a capital letter at the point of ambiguity, but further completion would then complete based on that inserted character missing the other "completion-direction"/files.

It's hard to describe so I'll show it: $ is my prompt, > is the completed prompt (using ls -d so that the directory name will be listedin output)

$ ls -d /etc/nf*
/etc/nfs.conf  /etc/nfsmount.conf  /etc/nftables.conf  /etc/nftables.d
$ ls -d /etc/nf<tab>
> ls -d /etc/nfT
$ ls -d /etc/nfT<tab>
> ls -d /etc/nftables.

Changing from character ranges {a-zA-Z} to character classes {[:lower:][:upper:]} fixes that.

EDIT: It seems related to https://github.com/ohmyzsh/ohmyzsh/issues/10972 and an issue of ZSH itself as mentioned there, but nevertheless this PR helps.