]> git.pld-linux.org Git - projects/pld-ftp-admin.git/commitdiff
- prefix commands with "pfa-"
authorElan Ruusamäe <glen@pld-linux.org>
Sat, 12 Feb 2011 18:47:45 +0000 (18:47 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Sat, 12 Feb 2011 18:47:45 +0000 (18:47 +0000)
Changed files:
    shell/bash-completion.sh -> 1.4

shell/bash-completion.sh

index 76b0796f85b92a3a86d09e732e0430668fa683fd..19c6ea2a6b440e299a4e293a94c9a9f063e88537 100644 (file)
@@ -2,25 +2,25 @@
 # Author: Elan Ruusamäe <glen@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 @@ _pld_ftp_tree_files() {
     done
 }
 
-have gen-indexes &&
-_gen-indexes()
+have pfa-genindex &&
+_pfa-genindex()
 {
     local cur
 
@@ -49,13 +49,13 @@ _gen-indexes()
             ' \
             -- "$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 @@ _lintpkg()
     _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 @@ _mvpkg()
     _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
This page took 0.079986 seconds and 4 git commands to generate.