gradle / gradle-completion

Gradle tab completion for bash and zsh
MIT License
1.02k stars 131 forks source link

When using bash menu-complete, completion includes task description, resulting in incorrect command #93

Open PhilipRoman opened 4 years ago

PhilipRoman commented 4 years ago

When Tab key is bound to menu-complete, the following happens:

/root/java/jws-998> gradle [TAB]
assemble  - Assembles the outputs of this project.
assembleDist  - Assembles the main distributions
assembleShadowDist  - Assembles the shadow distributions
build  - Assembles and tests this project.
buildDependents  - Assembles and tests this project and all projects that depend on it.
buildEnvironment  - Displays all buildscript dependencies declared in root project jws-998.
...
/root/java/jws-998> gradle assemble  - Assembles the outputs of this project.

As you can see, the task description is included in the command I'm typing, which obviously results in an error because Task '-' not found in root project 'jws-998'. This means that in order to use Gradle completion, I have to delete the description manually, which makes it very inefficient.

If it isn't possible to fix this, is there at least a way to disable task descriptions?

Software versions and configuration

Gradle completion version: commit fa72b796a68

bash --version
GNU bash, version 5.0.11(1)-release (x86_64-pc-linux-gnu)