[Rivet-svn] r2782 - in trunk: . data

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Sat Nov 27 00:49:41 GMT 2010


Author: buckley
Date: Sat Nov 27 00:49:40 2010
New Revision: 2782

Log:
Improvements to programmable completion using the neat _filedir completion shell function which I just discovered ;)

Modified:
   trunk/ChangeLog
   trunk/data/rivet-completion

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	Fri Nov 26 22:27:42 2010	(r2781)
+++ trunk/ChangeLog	Sat Nov 27 00:49:40 2010	(r2782)
@@ -1,3 +1,8 @@
+2010-11-27  Andy Buckley  <andy at insectnation.org>
+
+	* Improvements to programmable completion using the neat _filedir
+	completoin shell function which I just discovered.
+
 2010-11-26  Andy Buckley  <andy at insectnation.org>
 
 	* Tweak to floating point inRange to use fuzzyEquals for CLOSED

Modified: trunk/data/rivet-completion
==============================================================================
--- trunk/data/rivet-completion	Fri Nov 26 22:27:42 2010	(r2781)
+++ trunk/data/rivet-completion	Sat Nov 27 00:49:40 2010	(r2782)
@@ -36,12 +36,6 @@
         fi
     fi
 
-    files=$(ls)
-    COMPREPLY=( $(compgen -W "$opts $files" -- ${cur}) )
-    if test -n "$COMPREPLY"; then
-        return 0
-    fi
-
     return 0
 }
 
@@ -79,7 +73,7 @@
 }
 
 
-complete -F _rivet_config -o default rivet-config
+complete -F _rivet_config rivet-config
 
 
 ##############################
@@ -113,12 +107,7 @@
         return 0
     fi
 
-    files=$(ls *.aida)
-    COMPREPLY=( $(compgen -W "$opts $files" -- ${cur}) )
-    if test -n "$COMPREPLY"; then
-        return 0
-    fi
-
+    _filedir aida
     return 0
 }
 
@@ -150,12 +139,7 @@
         fi
     fi
 
-    files=$(ls *.dat)
-    COMPREPLY=( $(compgen -W "$opts $files" -- ${cur}) )
-    if test -n "$COMPREPLY"; then
-        return 0
-    fi
-
+    _filedir dat
     return 0
 }
 


More information about the Rivet-svn mailing list