[yum-commits] etc/yum.bash

Ville Skyttä scop at osuosl.org
Sat Apr 12 10:40:35 UTC 2014


 etc/yum.bash |   32 +++++++++++++++++++++++++++++---
 1 file changed, 29 insertions(+), 3 deletions(-)

New commits:
commit df07f048a9b600200616289ff1fa950ca8d4432a
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sat Apr 12 13:40:06 2014 +0300

    Add bash completion for fs

diff --git a/etc/yum.bash b/etc/yum.bash
index fa99eb7..713a72f 100644
--- a/etc/yum.bash
+++ b/etc/yum.bash
@@ -172,9 +172,10 @@ _yum()
         _get_comp_words_by_ref -n = cur prev words
 
     # Commands offered as completions
-    local cmds=( autoremove check check-update clean deplist distro-sync downgrade
-        erase groups help history info install list load-transaction makecache provides
-        reinstall remove repolist search shell update upgrade version )
+    local cmds=( autoremove check check-update clean deplist distro-sync
+        downgrade erase fs groups help history info install list
+        load-transaction makecache provides reinstall remove repolist search
+        shell update upgrade version )
 
     local i c cmd subcmd
     for (( i=1; i < ${#words[@]}-1; i++ )) ; do
@@ -233,6 +234,31 @@ _yum()
             return 0
             ;;
 
+        fs)
+            if [[ $prev == $cmd ]] ; then
+                COMPREPLY=( $( compgen -W 'filters filter refilter
+                    refilter-cleanup du status diff' -- "$cur" ) )
+                return 0
+            fi
+            case $subcmd in
+                filter)
+                    COMPREPLY=( $( compgen -W 'languages documentation' \
+                        -- "$cur" ) )
+                    return 0
+                    ;;
+                refilter|refilter-cleanup)
+                    _yum_list installed "$cur"
+                    return 0
+                    ;;
+                du|status|diff)
+                    local IFS=$'\n'
+                    COMPREPLY=( $( compgen -f -o plusdirs -- "$cur" ) )
+                    return 0
+                    ;;
+            esac
+            return 0
+            ;;
+
         group*)
             if [[ ($cmd == groups || $cmd == group) && $prev == $cmd ]] ; then
                 COMPREPLY=( $( compgen -W 'info install list remove summary' \


More information about the Yum-commits mailing list