Foldex/r2mod_cli

Autocomplete from middle of mod name + case insensitive completion

Hnaguski opened this issue · 1 comments

Trying to install mods entirely from the command line is a bit of a pain currently, as (at least for me) the zsh completion only matches results from the beginning of the string. For example, if I want to install the TooManyFriends mod, I type r2mod install too then hit tab, but it wouldn't return anything. I'd have to first type r2mod install wildbook then hit tab and it would then list all the mods that they've uploaded to thunderstore.
I'm not sure if this is a configuration error with my own .zshrc or if the zsh completion script could be updated to support this feature. I'd also suggest that case insensitive completion be supported, as it would help with finding mods as well.

Added in 2b80639
Should shore up the zsh side of things, though I'm not sure if bash's completion system allows for anything similar without requiring configuring the shell itself.

As an aside, you can globally enable case-insensitive completions in zsh with:
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}'
in your .zshrc.