gradle / gradle-completion

Gradle tab completion for bash and zsh
MIT License
1.03k stars 133 forks source link

add support for uppercase subprojects #61

Open bastik opened 6 years ago

bastik commented 6 years ago

Hi, it refuses to complete subprojects starting with an uppercase letter, e.g. $ gradle :MySubproje... In the project I am working, the names are fixed and renaming to lowercase is not an option.

eriwen commented 6 years ago

Thank for the report. Let's see what we can do here.

mreichelt commented 1 year ago

I was puzzled when the autocompletion didn't work for a project of mine, and it turned out to be the same issue: All project names start with an uppercase letter, and therefore are filtered out entirely.

I managed to change this line on my local machine:

# old regex:
^([[:lower:]][[:alnum:][:punct:]]*)([[:space:]]-[[:space:]]([[:print:]]*))?

# new regex:
^([[:alnum:][:punct:]]*)([[:space:]]-[[:space:]]([[:print:]]*))?

This now works for me!

I see there already is an open PR with a very similar approach that should also work - it would be nice to see this merged!