|
[Rivet-svn] rivet: Declare --cmd option to rivet-buildplugin, and supply a b...Rivet Mercurial rivet at projects.hepforge.orgWed May 11 22:15:02 BST 2016
details: https://rivet.hepforge.org/hg/rivet/rev/1b51ed17a156 branches: release-2-4-x changeset: 5203:1b51ed17a156 user: Andy Buckley <andy at insectnation.org> date: Wed May 11 22:12:05 2016 +0100 description: Declare --cmd option to rivet-buildplugin, and supply a bash completion function for it diffs (49 lines): --- a/bin/rivet-buildplugin.in Wed May 11 09:33:47 2016 +0100 +++ b/bin/rivet-buildplugin.in Wed May 11 22:12:05 2016 +0100 @@ -21,6 +21,7 @@ echo "Options:" echo " -h | --help: display this help message" echo " --with-root: add ROOT link options (requires root-config on system)" + echo " --cmd: just print the generated compiler command, do not execute it echo echo "TODO:" echo " * is there a GCC option to parallelise the single-command compilation?" --- a/bin/rivet-completion Wed May 11 09:33:47 2016 +0100 +++ b/bin/rivet-completion Wed May 11 22:12:05 2016 +0100 @@ -100,6 +100,36 @@ complete -F _rivet_config rivet-config +########################## + + +function _rivet_buildplugin() { + local cur prev commands options command + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + + opts="--help -h --with-root --cmd" + if [[ ${cur} == -* ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + if test -n "$COMPREPLY"; then + return 0 + fi + fi + + # COMPREPLY=( $(compgen -W "$opts" -- ${cur}) ) + # if test -n "$COMPREPLY"; then + # return 0 + # fi + + _filedir + return 0 +} + + +complete -F _rivet_buildplugin rivet-buildplugin + + ##############################
More information about the Rivet-svn mailing list |