[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 7c192589aef4b35b024d1175fa5b8c2912894e3d

Ville Skyttä ville.skytta at iki.fi
Mon Oct 19 18:33:12 UTC 2009


The following commit has been merged in the master branch:
commit 7c192589aef4b35b024d1175fa5b8c2912894e3d
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Mon Oct 19 21:33:09 2009 +0300

    Improve gkrellm completion.

diff --git a/CHANGES b/CHANGES
index a8459ea..081d2ff 100644
--- a/CHANGES
+++ b/CHANGES
@@ -15,6 +15,7 @@ bash-completion (1.x)
   * Apply cardctl completion to pccardctl too.
   * Apply pine completion to alpine too.
   * Remove many unnecessary short option completions where long ones exist.
+  * Improve gkrellm completion.
 
  -- David Paleino <d.paleino at gmail.com>  Sun, 11 Oct 2009 11:11:57 +0200
 
diff --git a/contrib/gkrellm b/contrib/gkrellm
index d3e22b0..1d7f645 100644
--- a/contrib/gkrellm
+++ b/contrib/gkrellm
@@ -10,28 +10,37 @@ _gkrellm()
     prev=${COMP_WORDS[COMP_CWORD-1]}
 
     case "$prev" in
-        -@(t|-theme))
+        -t|--theme)
             _filedir -d
             return 0
             ;;
-        -@(p|-plugin))
-            _filedir 'so'
+        -p|--plugin)
+            _filedir so
             return 0
             ;;
-        -@(s|-server))
+        -s|--server)
             _known_hosts_real "$cur"
             return 0
             ;;
+        -l|--logfile)
+            _filedir
+            return 0
+            ;;
+        -g|--geometry|-c|--config|-P|--port|-d|--debug-level)
+            # Argument required but no completions available
+            return 0
+            ;;
     esac
 
     if [[ "$cur" == -* ]]; then
-        COMPREPLY=( $( compgen -W '--help --theme --server \
-            --geometry --wm --withdrawn --config --nc \
-            --force-host-config --demo --plugin --port' -- "$cur" ) )
+        COMPREPLY=( $( compgen -W '--theme --geometry --wm --m2 --nt \
+            --withdrawn --config --force-host-config --server --port --nc \
+            --config-clean --nolock --plugin --demo --logfile --version \
+            --debug-level --help' -- "$cur" ) )
     fi
 
 } &&
-complete -F _gkrellm gkrellm gkrellm2
+complete -F _gkrellm $filenames gkrellm gkrellm2
 
 # Local variables:
 # mode: shell-script

-- 
bash-completion



More information about the Bash-completion-commits mailing list