[Rivet-svn] r3535 - trunk/data

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Sat Dec 31 14:08:15 GMT 2011


Author: buckley
Date: Sat Dec 31 14:08:14 2011
New Revision: 3535

Log:
Fixing all arg matching to be complete, i.e. prev = -m should only match -m, not e.g. rivet-mkhtml

Modified:
   trunk/data/rivet-completion

Modified: trunk/data/rivet-completion
==============================================================================
--- trunk/data/rivet-completion	Fri Dec 30 13:45:03 2011	(r3534)
+++ trunk/data/rivet-completion	Sat Dec 31 14:08:14 2011	(r3535)
@@ -30,23 +30,23 @@
 
     if test -x "$(which rivet 2> /dev/null)"; then
         anas=$(rivet --list-analyses)
-        if (echo ${prev} | egrep -- "-a|--analysis|--show-analysis|--list-analyses" &> /dev/null); then
+        if (echo ${prev} | egrep -- "\<-a\>|\<--analysis\>|\<--show-analysis\>|\<--list-analyses\>" &> /dev/null); then
             COMPREPLY=( $(compgen -W "$anas" -- ${cur}) )
             return 0
         fi
     fi
 
-    if (echo ${prev} | egrep -- "-n|--nevts|--runname|--histo-interval|--cross-section|-x|--event-timeout" &> /dev/null); then
+    if (echo ${prev} | egrep -- "\<-n\>|\<--nevts\>|\<--runname\>|\<--histo-interval\>|\<--cross-section\>|\<-x\>|\<--event-timeout\>" &> /dev/null); then
         COMPREPLY=()
         return 0
     fi
 
-    if (echo ${prev} | egrep -- "--histo-file|-H" &> /dev/null); then
+    if (echo ${prev} | egrep -- "\<--histo-file\>|\<-H\>" &> /dev/null); then
         _filedir aida
         return 0
     fi
 
-    if (echo ${prev} | egrep -- "--analysis-path|--analysis-path-append" &> /dev/null); then
+    if (echo ${prev} | egrep -- "\<--analysis-path\>|\<--analysis-path-append\>" &> /dev/null); then
         _filedir -d
         return 0
     fi
@@ -195,17 +195,17 @@
     fi
 
     ## Options with files / directories as the arg
-    if (echo ${prev} | egrep -- "--outputdir|-o" &> /dev/null); then
+    if (echo ${prev} | egrep -- "\<--outputdir\>|\<-o\>" &> /dev/null); then
         _filedir -d
         return 0
     fi
-    if (echo ${prev} | egrep -- "--config|-c" &> /dev/null); then
+    if (echo ${prev} | egrep -- "\<--config\>|\<-c\>" &> /dev/null); then
         _filedir
         return 0
     fi
 
     ## Options without an completeable arg
-    if (echo ${prev} | egrep -- "-t|--title|--refid|--n|--num-threads|-m|--match|-M|--unmatch" &> /dev/null); then
+    if (echo ${prev} | egrep -- "\<-t\>|\<--title\>|\<--refid\>|\<--n\>|\<--num-threads\>|\<-m\>|\<--match\>|\<-M\>|\<--unmatch\>" &> /dev/null); then
         COMPREPLY=()
         return 0
     fi


More information about the Rivet-svn mailing list