juven / maven-bash-completion Goto Github PK
View Code? Open in Web Editor NEWMaven Bash Auto Completion
License: Apache License 2.0
Maven Bash Auto Completion
License: Apache License 2.0
Only one profile is completed by command.
Work :
mvn -P[tab]
profile1 profile2 profile3
Doesn't work :
mvn -Pprofile1,[tab]
profile2 profile3
"^M" are added after each profil name.
$ mvn -P
-Pfoo^M -Pbar^M -Ptoto^M
$ mvn -Pfoo^M
It works for mvnw
but not for ./mvnw
which is the way mvnw is usually invoked.
Maybe it is due to a change in bash, because I would swear it used to work.
My version of bash is GNU bash, version 5.1.16(1)-release
.
Spring Boot command line arguments are passed by the option -Dspring-boot.run.arguments=
(for Spring Boot 2.x) or -Drun.arguments
(for Spring Boot 1.x). It would be nice if maven-bash-completion
can support this option.
It would be nice to have completion for the goals of maven wrapper plugin :
This plugin has 2 goals:
wrapper:help
Display help information on maven-wrapper-plugin.
Call mvn wrapper:help -Ddetail=true -Dgoal=<goal-name> to display parameter
details.
wrapper:wrapper
Unpacks the maven-wrapper distribution files to the current project source
tree.
Type mvn dep[TAB]
.
See 2 candidates: deploy
and dependency:
.
Directly expands to mvn deploy
.
I would like to create a AUR package for ArchLinux from your script and it is considered good practice to name the license of code you're using in a AUR package.
Under which license do you distribute the maven-bash-completion script?
Output then looks like this ("mvn cl[TAB]"):
> mvn clgrep: /{PARENT_PATH}/pom.xml
Saving session...
...saving history...truncating history files...
...completed.: No such file or directory
ean
FYI: The /{PARENT_PATH}/pom.xml
does exist and is parent with pom packaging.
complete to all Test class names under the current dir
I installed the tool and tried it out on folder out of a maven project.
I did typed
mvn clean instal -pl<tab>
and the prompt become stuck!
maybe it is simple to create a validation function that check if the current folder has a pom.xml files, and use in cases like this?
The readme has a typo in the homebrew installation steps.
It contains:
brew tap homebrew/completion
However the correct repository name ends with an 's':
brew tap homebrew/completions
Without the 's' homebrew asks for github login data, which is confusing and hides the real error message.
I need help on creating auto completion on platform like Windows and MavenHub console.
for example, when using 'mvn release:prepare', I'd like to get -DautoVersionSubmodules
I don't see any results
Something I use and miss being able to tab complete:
I'll create a pull request for this ...
the options can be stored in some files under user's directory, and load it if exists
Hello, I installed mvn-bash-completion using homebrew (brew install maven-completion).
I don't know if this installation is maintained by you, but after the installation I opened a new terminal and the completion was not working.
Are there follow up steps that should be followed after the installation with homebrew?
I will install it manually for now.
I found script can't complete goals for Properties Maven plugin
Here is solution #77
Should this work on Windows under Git Bash?
Paul@aspire MINGW64 /d/Workspaces/workspace-sts-3.8.2.RELEASE/com.example.spring.starter
$ cat ~/.bash_profile
. ~/.maven_bash_completion.bash
Paul@aspire MINGW64 /d/Workspaces/workspace-sts-3.8.2.RELEASE/com.example.spring.starter
$ mvn cl
I can't get completion for cl
Would it be possible to provide tagged releases?
The homebrew-completions project contains a homebrew formula for installing the maven bash completion. I recently opened a PR (Homebrew/homebrew-completions#116) to upgrade to the latest commit, but the maintainers would prefer to reference a tagged release instead of a git commit hash.
As a mvn user, I want a handy way to get the homepage url of a plugin I'm interested, so I don't need to search it with Google.
This script should auto complete the plugin name for me.
But for now I'm not sure what kind of command I should use, it needs to be very handy, and not interfere ordinary mvn commands.
There simple jboss plugin support
But can there jbossas plubing support added?
plugin page https://docs.jboss.org/jbossas/7/plugins/maven/latest/
Rename bash file to .maven_bash_completion.bash
or change README to use the same name bash_completion.bash
ref #83
dependency:analyze-duplicate
Just a missing standard goal to add to the collection. Regards.
parse available profiles id from pom and settings
Hello!
Here is more correct way of installing bash completion in Debian/Ubuntu (may be for other distribs too)
sudo wget https://raw.github.com/juven/maven-bash-completion/master/bash_completion.bash --output-document /etc/bash_completion.d/mvn
Debian (Ubuntu, ...) package should be very easy.
Put the script in /etc/bash_completion.d and voilà.
$ mvn -bash: _git_reassemble_comp_words_by_ref: command not found
-bash: words: bad array subscript
-bash: _git_reassemble_comp_words_by_ref: command not found
-bash: words: bad array subscript
clean package test
compile process-resources test-compile
deploy process-test-resources verify
install site
使用其它命令也是一样的,只列出几个生命同期
I put the path in
C:\Users\name\maven_bash_autocomplete\bash_completion.bash
and updated
C:\Users\name\.bashrc
to
eval "$(oh-my-posh init bash --config ~/oh-my-posh-themes/amro.omp.json)"
# Bash aliases
alias .='explorer .'
alias ..='cd ..'
alias ....='cd ../../'
alias ......='cd ../../../'
alias ........='cd ../../../../'
alias ls='ls -lah --color --group-directories-first'
alias komis-be='cd c:/Dev/komis/cvti-gitlab/komis-skcris-netgrif-be/'
alias komis-fe='cd c:/Dev/komis/cvti-gitlab/komis-skcris-netgrif-fe/'
alias sawo='cd c:/Dev/SAWO/'
alias iwcp='cd c:/Dev/iwaycloud/service-broker/'
# Bash shell settings
# Typing a directory name just by itself will automatically change into that directory.
shopt -s autocd
# Automatically fix directory name typos when changing directory.
shopt -s cdspell
# Automatically expand directory globs and fix directory name typos whilst completing.
# Note, this works in conjuction with the cdspell option listed above.
shopt -s direxpand dirspell
# Ignore lines which begin with a <space> and match previous entries.
# Erase duplicate entries in history file.
HISTCONTROL=ignoreboth:erasedups
# kubectl autocomplete
source <(kubectl completion bash)
alias k=kubectl
#complete -F __start_kubectl k
. ~/maven_bash_autocomplete/bash_completion.bash
What it does is it opens explorer right after I start Gitbash session in Windows terminal. So it seems that it gets loaded up, but something is not working.
On mvn cl[tab]
it fills in mvn clr
See https://github.com/mvndaemon/mvnd. Should complete for mvnd
commands. Mostly the same as for mvn
; can probably ignore the two or so mvnd-specific options.
I have moved to ZSH with oh-my-zsh and its MVN plugin is not as awesome as your script. I really miss autocompleting of the profiles (among other stuff).
So please consider porting this script to oh-my-zsh plugin (call it maven, not to conflict with current mvn, or simply overwrite it).
The option -Dmaven.javadoc.skip=true from the standard javadoc plugin is missing http://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#skip
Great work! Thanks for this tool!
Hi,
When I press [TAB] twice, the list of completions does not include any of the tomcat plugins (e.g. tomcat, tomcat6, tomcat7). However it does work if I start typing "tom" then [TAB].
Moreover, and this is the most annoying IMHO, the goal "redeploy" is not completed when using "tomcat7" phase.
Adding |tomcat7:redeploy
in the variable "local plugin_goals_tomcat7" on line 177 seems to solve this second problem, but I can't find a workaround for the first.
Thank you in advance for your answers
It would be nice to have support for maven spotbugs plugin.
Spotbugs is a successor successor to Findbugs.
The plugin has the following goals:
spotbugs:check
spotbugs:gui
spotbugs:help
spotbugs:spotbugs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.