[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 3123e2ac4c7a5f7b562426d12d7d417d2a8ad25e

Ville Skyttä ville.skytta at iki.fi
Sat Feb 5 14:54:52 UTC 2011


The following commit has been merged in the master branch:
commit 3123e2ac4c7a5f7b562426d12d7d417d2a8ad25e
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sat Feb 5 16:54:48 2011 +0200

    Add gendiff completion.

diff --git a/CHANGES b/CHANGES
index 86ee358..de7954b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -14,9 +14,9 @@ bash-completion (2.x)
   [ Ville Skyttä ]
   * Activate hping2 completion also for hping and hping3.
   * Add badblocks, compgen, crontab, dumpe2fs, e2freefrag, e2label, ether-wake,
-    filefrag, growisofs, iftop, ip (Debian: #600617), lrzip, lsof, mktemp,
-    portecle, POSIX sh, sha{,224,256,384,512}sum, sysbench, tune2fs, xmodmap,
-    and xrdb completions.
+    filefrag, gendiff, growisofs, iftop, ip (Debian: #600617), lrzip, lsof,
+    mktemp, portecle, POSIX sh, sha{,224,256,384,512}sum, sysbench, tune2fs,
+    xmodmap, and xrdb completions.
   * Add *.gif (Alioth: #312512), *.m2t (Alioth: #312770), *.3gpp, *.3gpp2,
     *.awb, and *.iso (Alioth: #311420) to mplayer filename completions.
   * Add "short" tarball extensions to unxz, unlzma etc completions.
diff --git a/completions/rpm b/completions/rpm
index f07ba7d..bbab036 100644
--- a/completions/rpm
+++ b/completions/rpm
@@ -290,6 +290,16 @@ _rpm()
 complete -F _rpm rpm rpmbuild
 }
 
+have gendiff &&
+_gendiff()
+{
+    COMPREPLY=()
+    local cur cword
+    _get_comp_words_by_ref cur cword
+    [[ $cword != 1 ]] || _filedir -d
+} &&
+complete -F _gendiff gendiff
+
 # Local variables:
 # mode: shell-script
 # sh-basic-offset: 4

-- 
bash-completion



More information about the Bash-completion-commits mailing list