pld-ftp-admin: shell/bash-completion.sh - prefix commands with "pfa-"

glen glen at pld-linux.org
Sat Feb 12 19:47:50 CET 2011


Author: glen                         Date: Sat Feb 12 18:47:50 2011 GMT
Module: pld-ftp-admin                 Tag: HEAD
---- Log message:
- prefix commands with "pfa-"

---- Files affected:
pld-ftp-admin/shell:
   bash-completion.sh (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: pld-ftp-admin/shell/bash-completion.sh
diff -u pld-ftp-admin/shell/bash-completion.sh:1.3 pld-ftp-admin/shell/bash-completion.sh:1.4
--- pld-ftp-admin/shell/bash-completion.sh:1.3	Thu Feb  3 12:53:20 2011
+++ pld-ftp-admin/shell/bash-completion.sh	Sat Feb 12 19:47:45 2011
@@ -2,25 +2,25 @@
 # Author: Elan Ruusamäe <glen at pld-linux.org>
 
 # return list of pld ftp trees
-_pld_ftp_tree() {
+_pfa_tree() {
     local cur="$1"
-    if [ -z "$PLD_FTP_TREES" ]; then
+    if [ -z "$PFA_TREES" ]; then
         local d
         local -a trees
         for d in  ~/ftp/*/; do
             d=${d%/}
             d=${d##*/}
-            PLD_FTP_TREES+=" $d"
+            PFA_TREES+=" $d"
         done
         # kill leading space
-        PLD_FTP_TREES=${PLD_FTP_TREES# }
+        PFA_TREES=${PFA_TREES# }
     fi
 
-    COMPREPLY=( $( compgen -W "$PLD_FTP_TREES" -- "$cur" ) )
+    COMPREPLY=( $( compgen -W "$PFA_TREES" -- "$cur" ) )
 }
 
 # return list of files in a tree
-_pld_ftp_tree_files() {
+_pfa_tree_files() {
     local tree="$1" cur="$2" file i
     local dir=~/ftp/$tree/SRPMS/.metadata
 
@@ -33,8 +33,8 @@
     done
 }
 
-have gen-indexes &&
-_gen-indexes()
+have pfa-genindex &&
+_pfa-genindex()
 {
     local cur
 
@@ -49,13 +49,13 @@
             ' \
             -- "$cur" ) )
     else
-        _pld_ftp_tree "$cur"
+        _pfa_tree "$cur"
     fi
 } &&
-complete -F _gen-indexes gen-indexes
+complete -F _pfa-genindex pfa-genindex
 
-have lintpkg &&
-_lintpkg()
+have pfa-lintpkg &&
+_pfa-lintpkg()
 {
     local cur
 
@@ -66,15 +66,15 @@
     _count_args :
 
     if [[ $args == 1 ]]; then
-        _pld_ftp_tree "$cur"
+        _pfa_tree "$cur"
     else
-        _pld_ftp_tree_files "${COMP_WORDS[1]}" "$cur"
+        _pfa_tree_files "${COMP_WORDS[1]}" "$cur"
     fi
 } &&
-complete -F _lintpkg lintpkg signpkg rmpkg
+complete -F _pfa-lintpkg pfa-lintpkg pfa-signpkg pfa-rmpkg
 
-have mvpkg &&
-_mvpkg()
+have pfa-mvpkg &&
+_pfa-mvpkg()
 {
     local cur
 
@@ -85,12 +85,12 @@
     _count_args :
 
     if [[ $args == 1 ]] || [[ $args == 2 ]]; then
-        _pld_ftp_tree "$cur"
+        _pfa_tree "$cur"
     else
-        _pld_ftp_tree_files "${COMP_WORDS[1]}" "$cur"
+        _pfa_tree_files "${COMP_WORDS[1]}" "$cur"
     fi
 } &&
-complete -F _mvpkg mvpkg testmvpkg
+complete -F _pfa-mvpkg pfa-mvpkg pfa-testmvpkg
 
 # Local variables:
 # mode: shell-script
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-ftp-admin/shell/bash-completion.sh?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list