~jeff-apple/openvista-gtm-integration/bug360710

« back to all changes in this revision

Viewing changes to scripts/etc/bash_completion.d/openvista

  • Committer: Jonathan Tai
  • Date: 2009-02-13 02:44:20 UTC
  • mfrom: (1.1.36 scripts+packaging)
  • Revision ID: jon.tai@medsphere.com-20090213024420-dssgk67iztyi7y8s
Merge scripts+packaging branch into mainline to lay the foundation for other work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# bash completion for OpenVista command-line utilities
 
2
 
 
3
 
 
4
# Copyright (C) 2009 Medsphere Systems Corporation
 
5
#
 
6
# This program is free software; you can redistribute it and/or modify it solely
 
7
# under the terms of the GNU Affero General Public License version 3 as published
 
8
# by the Free Software Foundation.
 
9
 
10
# This program is distributed in the hope that it will be useful, but WITHOUT
 
11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
12
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License
 
13
# for more details.
 
14
 
15
# You should have received a copy of the GNU Affero General Public License
 
16
# along with this program.  If not, see <http://www.gnu.org/licenses>.
 
17
 
18
# You can contact Medsphere Systems Corporation headquarters at 1917 Palomar 
 
19
# Oaks Way, Suite 200, Carlsbad, CA 92008 or at legal@medsphere.com.
 
20
 
 
21
 
 
22
_openvista_instances()
 
23
{
 
24
    root="/opt/openvista"
 
25
    cur=${COMP_WORDS[COMP_CWORD]}
 
26
    if [ $COMP_CWORD -eq 1 ]; then
 
27
        COMPREPLY=( $(compgen -W "$(ls -1 $root 2> /dev/null)" $cur ) )
 
28
    fi
 
29
}
 
30
 
 
31
complete -F _openvista_instances openvista
 
32
complete -F _openvista_instances ovtied
 
33
complete -F _openvista_instances ovbackup
 
34