1 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # Filename: package/.../bashcompletion/rock-tools
5 # Copyright (C) 1998 - 2004 Clifford Wolf
7 # More information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; version 2 of the License. A copy of the
12 # GNU General Public License can be found in the file COPYING.
13 # --- SDE-COPYRIGHT-NOTE-END ---
16 COMPREPLY=( $( compgen -W "$( command \
17 sed -ne 's|^interface \([^ ]\+\).*$|\1|p' \
18 /etc/network/config )" -- $cur ) )
21 _mine_installed_packages() {
22 COMPREPLY=( $( compgen -W "`(cd /var/adm/packages; echo *)`" -- $cur ) )
29 cur=${COMP_WORDS[COMP_CWORD]}
30 prev=${COMP_WORDS[COMP_CWORD-1]}
32 if [ $COMP_CWORD -eq 1 ]; then
35 COMPREPLY=( $( compgen -W '-i -r -q -p -l -m -c -d -k -C -T' \
49 COMPREPLY=( $( compgen -W 'pkg_name pkg_version pkg_tarbz2 \
50 pkg_config packages flists md5sums cksums \
51 dependencies descs creator COPY I TITLE T \
52 TEXT U URL A AUTHOR M MAINTAINER C CATEGORY \
53 F FLAG R ARCH ARCHITECTURE E DEP DEPENDENCY \
54 L LICENSE S STATUS V VER VERSION P PRI \
55 PRIORITY CV-URL CV-PAT CV-DEL O CONF D DOWN \
56 DOWNLOAD SRC SOURCEPACKAGE' -- $cur ) )
60 case "${COMP_WORDS[1]}" in
62 if [[ "$cur" == -* ]]; then
63 COMPREPLY=( $( compgen -W '-t -v -f -R' -- $cur ) )
69 if [[ "$cur" == -* ]]; then
70 COMPREPLY=( $( compgen -W '-t -v -f -R' -- $cur ) )
72 _mine_installed_packages
76 if [[ "$cur" == -* ]]; then
77 COMPREPLY=( $( compgen -W '-h -H' -- $cur ) )
79 _mine_installed_packages
84 if [[ "$cur" == -* ]]; then
85 COMPREPLY=( $( compgen -W '-h -H' -- $cur ) )
99 _mine_installed_packages
104 case "$COMP_CWORD" in
109 _mine_installed_packages
116 complete -F _mine $filenames mine
121 cur=${COMP_WORDS[COMP_CWORD]}
122 prev=${COMP_WORDS[COMP_CWORD-1]}
124 if [ $COMP_CWORD -eq 1 ]; then
125 #first parameter on line
126 if [ -r /etc/rc.d/init.d ]; then
127 COMPREPLY=( $( compgen -W "`(cd /etc/rc.d/init.d; echo *)`" \
133 if [ $COMP_CWORD -eq 2 ]; then
134 #second parameter on line
135 COMPREPLY=( $( compgen -W "$( command rc $prev help | \
136 cut -d{ -f2 | tr -d '{}|' )" \
141 complete -F _rc $filenames rc