1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../bashcompletion/rock-tools
5 # Copyright (C) 2004 - 2008 The T2 SDE Project
6 # Copyright (C) 1998 - 2004 ROCK Linux Project
8 # More information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- T2-COPYRIGHT-NOTE-END ---
17 COMPREPLY=( $( compgen -W "$( command \
18 sed -ne 's|^interface \([^ ]\+\).*$|\1|p' \
19 /etc/network/config )" -- $cur ) )
22 _mine_installed_packages() {
23 COMPREPLY=( $( compgen -W "`(cd /var/adm/packages; echo *)`" -- $cur ) )
30 cur=${COMP_WORDS[COMP_CWORD]}
31 prev=${COMP_WORDS[COMP_CWORD-1]}
33 if [ $COMP_CWORD -eq 1 ]; then
36 COMPREPLY=( $( compgen -W '-i -r -q -p -l -m -c -d -k -C -T' \
50 COMPREPLY=( $( compgen -W 'pkg_name pkg_version pkg_tarbz2 \
51 pkg_config packages flists md5sums cksums \
52 dependencies descs creator COPY I TITLE T \
53 TEXT U URL A AUTHOR M MAINTAINER C CATEGORY \
54 F FLAG R ARCH ARCHITECTURE E DEP DEPENDENCY \
55 L LICENSE S STATUS V VER VERSION P PRI \
56 PRIORITY CV-URL CV-PAT CV-DEL O CONF D DOWN \
57 DOWNLOAD SRC SOURCEPACKAGE' -- $cur ) )
61 case "${COMP_WORDS[1]}" in
63 if [[ "$cur" == -* ]]; then
64 COMPREPLY=( $( compgen -W '-t -v -f -R' -- $cur ) )
70 if [[ "$cur" == -* ]]; then
71 COMPREPLY=( $( compgen -W '-t -v -f -R' -- $cur ) )
73 _mine_installed_packages
77 if [[ "$cur" == -* ]]; then
78 COMPREPLY=( $( compgen -W '-h -H' -- $cur ) )
80 _mine_installed_packages
85 if [[ "$cur" == -* ]]; then
86 COMPREPLY=( $( compgen -W '-h -H' -- $cur ) )
100 _mine_installed_packages
105 case "$COMP_CWORD" in
110 _mine_installed_packages
117 complete -F _mine $filenames mine
122 cur=${COMP_WORDS[COMP_CWORD]}
123 prev=${COMP_WORDS[COMP_CWORD-1]}
125 if [ $COMP_CWORD -eq 1 ]; then
126 #first parameter on line
127 if [ -r /etc/rc.d/init.d ]; then
128 COMPREPLY=( $( compgen -W "`(cd /etc/rc.d/init.d; echo *)`" \
134 if [ $COMP_CWORD -eq 2 ]; then
135 #second parameter on line
136 COMPREPLY=( $( compgen -W "$( command rc $prev help | \
137 cut -d{ -f2 | tr -d '{}|' )" \
142 complete -F _rc $filenames rc