summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/attachments/20110713/f8807b02
diff options
context:
space:
mode:
Diffstat (limited to 'zarb-ml/mageia-dev/attachments/20110713/f8807b02')
-rw-r--r--zarb-ml/mageia-dev/attachments/20110713/f8807b02/attachment-0001.obj78
-rw-r--r--zarb-ml/mageia-dev/attachments/20110713/f8807b02/attachment.obj78
2 files changed, 156 insertions, 0 deletions
diff --git a/zarb-ml/mageia-dev/attachments/20110713/f8807b02/attachment-0001.obj b/zarb-ml/mageia-dev/attachments/20110713/f8807b02/attachment-0001.obj
new file mode 100644
index 000000000..3a0ac77e4
--- /dev/null
+++ b/zarb-ml/mageia-dev/attachments/20110713/f8807b02/attachment-0001.obj
@@ -0,0 +1,78 @@
+# mgarepo(1) completion
+#
+#_cooker_packages()
+#{
+# COMPREPLY=( $( compgen -W '$(svn ls \
+# svn+ssh://svn.mandriva.com/svn/packages/cooker \
+# | sed -e "s|/$||" )' -- $cur ) )
+#}
+
+_mgarepo_actions()
+{
+ COMPREPLY=( $( compgen -W 'co ci authoremail changed create del \
+ getspec getsrpm import maintdb putsrpm rpmlog submit \
+ switch sync upload \
+ help' -- $cur ) )
+}
+
+_mgarepo()
+{
+ local cur prev command options i
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ $COMP_CWORD -eq 1 ]] ; then
+ _mgarepo_actions
+ else
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(c|-config))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ command=${COMP_WORDS[1]}
+
+ if [[ "$cur" == -* ]]; then
+ # possible options for the command
+ case $command in
+ submit)
+ options="--define"
+ ;;
+ sync)
+ options="--dry-run -c --download"
+ ;;
+ esac
+ options="$options --help"
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ else
+ case $command in
+ help)
+ _mgarepo_actions
+ return 0
+ ;;
+ import)
+ _filedir 'src.rpm'
+ return 0
+ ;;
+ upload)
+ _filedir 'tar.gz|tar.bz2|tar.lzma|tar.xz|zip'
+ return 0
+ ;;
+ del)
+ _filedir 'tar.gz|tar.bz2|tar.lzma|tar.xz|zip'
+ return 0
+ ;;
+ @(sync|commit|ci))
+ _filedir -d
+ return 0
+ ;;
+ esac
+ fi
+ fi
+
+}
+complete -F _mgarepo $filenames mgarepo \ No newline at end of file
diff --git a/zarb-ml/mageia-dev/attachments/20110713/f8807b02/attachment.obj b/zarb-ml/mageia-dev/attachments/20110713/f8807b02/attachment.obj
new file mode 100644
index 000000000..3a0ac77e4
--- /dev/null
+++ b/zarb-ml/mageia-dev/attachments/20110713/f8807b02/attachment.obj
@@ -0,0 +1,78 @@
+# mgarepo(1) completion
+#
+#_cooker_packages()
+#{
+# COMPREPLY=( $( compgen -W '$(svn ls \
+# svn+ssh://svn.mandriva.com/svn/packages/cooker \
+# | sed -e "s|/$||" )' -- $cur ) )
+#}
+
+_mgarepo_actions()
+{
+ COMPREPLY=( $( compgen -W 'co ci authoremail changed create del \
+ getspec getsrpm import maintdb putsrpm rpmlog submit \
+ switch sync upload \
+ help' -- $cur ) )
+}
+
+_mgarepo()
+{
+ local cur prev command options i
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ $COMP_CWORD -eq 1 ]] ; then
+ _mgarepo_actions
+ else
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(c|-config))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ command=${COMP_WORDS[1]}
+
+ if [[ "$cur" == -* ]]; then
+ # possible options for the command
+ case $command in
+ submit)
+ options="--define"
+ ;;
+ sync)
+ options="--dry-run -c --download"
+ ;;
+ esac
+ options="$options --help"
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ else
+ case $command in
+ help)
+ _mgarepo_actions
+ return 0
+ ;;
+ import)
+ _filedir 'src.rpm'
+ return 0
+ ;;
+ upload)
+ _filedir 'tar.gz|tar.bz2|tar.lzma|tar.xz|zip'
+ return 0
+ ;;
+ del)
+ _filedir 'tar.gz|tar.bz2|tar.lzma|tar.xz|zip'
+ return 0
+ ;;
+ @(sync|commit|ci))
+ _filedir -d
+ return 0
+ ;;
+ esac
+ fi
+ fi
+
+}
+complete -F _mgarepo $filenames mgarepo \ No newline at end of file