Merge lp:~derek-name/openvista-gtm-integration/bug646483 into lp:openvista-gtm-integration

Proposed by Derek_
Status: Merged
Merged at revision: 140
Proposed branch: lp:~derek-name/openvista-gtm-integration/bug646483
Merge into: lp:openvista-gtm-integration
Diff against target: 168 lines (+56/-27)
2 files modified
docs/man8/ovinstanceadd.8 (+5/-0)
scripts/etc/bash_completion.d/openvista (+51/-27)
To merge this branch: bzr merge lp:~derek-name/openvista-gtm-integration/bug646483
Reviewer Review Type Date Requested Status
Jon Tai Approve
Review via email: mp+36573@code.launchpad.net
To post a comment you must log in.
142. By Derek_

ovinstanceadd.8 (man page): Describe the -p option.

143. By Derek_

Fix typo and use defined variable in ovinstanceadd bash completion.

Revision history for this message
Jon Tai (jontai) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'docs/man8/ovinstanceadd.8'
--- docs/man8/ovinstanceadd.8 2010-09-23 21:43:57 +0000
+++ docs/man8/ovinstanceadd.8 2010-09-24 19:22:50 +0000
@@ -18,6 +18,11 @@
18database files, creates default configuration files, generates an SSH key for18database files, creates default configuration files, generates an SSH key for
19the instance, sets up an ssh forced command to run ^ZU in the instance, and19the instance, sets up an ssh forced command to run ^ZU in the instance, and
20creates the webdav root for the instance.20creates the webdav root for the instance.
21.PP
22By default, ovinstanceadd sets up the new instance to use the latest version of
23GT.M installed on the system. You can specify an alternate path to a GT.M
24installation with the -p flag. The -p flag was added in \fBovinstanceadd\fR
250.8.10.
21.SH OPTIONS26.SH OPTIONS
22.IP -p27.IP -p
23path; value of $gtm_dist for this instance28path; value of $gtm_dist for this instance
2429
=== modified file 'scripts/etc/bash_completion.d/openvista'
--- scripts/etc/bash_completion.d/openvista 2010-02-11 18:50:29 +0000
+++ scripts/etc/bash_completion.d/openvista 2010-09-24 19:22:50 +0000
@@ -6,16 +6,16 @@
6# This program is free software; you can redistribute it and/or modify it solely6# 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 published7# under the terms of the GNU Affero General Public License version 3 as published
8# by the Free Software Foundation.8# by the Free Software Foundation.
9# 9#
10# This program is distributed in the hope that it will be useful, but WITHOUT10# This program is distributed in the hope that it will be useful, but WITHOUT
11# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License12# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
13# for more details.13# for more details.
14# 14#
15# You should have received a copy of the GNU Affero General Public License15# 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>.16# along with this program. If not, see <http://www.gnu.org/licenses>.
17# 17#
18# You can contact Medsphere Systems Corporation headquarters at 1917 Palomar 18# You can contact Medsphere Systems Corporation headquarters at 1917 Palomar
19# Oaks Way, Suite 200, Carlsbad, CA 92008 or at legal@medsphere.com.19# Oaks Way, Suite 200, Carlsbad, CA 92008 or at legal@medsphere.com.
2020
2121
@@ -27,8 +27,8 @@
27 COMPREPLY=()27 COMPREPLY=()
2828
29 for i in `seq $COMP_CWORD`; do29 for i in `seq $COMP_CWORD`; do
30 # we've run out of the allowed number of non-option arguments; perform30 # we've run out of the allowed number of non-option arguments; perform
31 # no further completion31 # no further completion
32 if [ $allowed_nonopt_words -eq 0 ]; then32 if [ $allowed_nonopt_words -eq 0 ]; then
33 return33 return
34 fi34 fi
@@ -37,9 +37,9 @@
37 -*)37 -*)
38 # if one of the arguments so far is -h or -V, perform no further completion38 # if one of the arguments so far is -h or -V, perform no further completion
39 if [ x"${COMP_WORDS[i]}" = x"-h" ] || [ x"${COMP_WORDS[i]}" = x"-V" ]; then39 if [ x"${COMP_WORDS[i]}" = x"-h" ] || [ x"${COMP_WORDS[i]}" = x"-V" ]; then
40 # if we just return here, -h won't complete the space40 # if we just return here, -h won't complete the space
41 # afterward; use a hack to exit on the next iteration of41 # afterward; use a hack to exit on the next iteration of
42 # the loop42 # the loop
43 allowed_nonopt_words=043 allowed_nonopt_words=0
44 fi44 fi
45 ;;45 ;;
@@ -112,23 +112,47 @@
112112
113complete -F _ovrestore $filenames ovrestore113complete -F _ovrestore $filenames ovrestore
114114
115# ovinstanceadd [-h] [-V] NEW_INSTANCE_NAME115# ovinstanceadd [-h] [-V] [-p path] NEW_INSTANCE_NAME
116_ovinstanceadd()116_ovinstanceadd()
117{117{
118 opts='-h -V -p'
119 allowed_nonopt_words=1
120
118 COMPREPLY=()121 COMPREPLY=()
119122
120 if [ $COMP_CWORD -gt 1 ]; then123 for i in $(seq $COMP_CWORD); do
121 return124 [[ "$allowed_nonopt_words" == 0 ]] && return
122 fi125 case ${COMP_WORDS[i]} in
123126 -*)
124 case ${COMP_WORDS[COMP_CWORD]} in127 if [[ "${COMP_WORDS[i]}" == "-h" ]] \
128 || [[ "${COMP_WORDS[i]}" == "-V" ]]; then
129 allowed_nonopt_words=0
130 elif [[ "${COMP_WORDS[i]}" == "-p" ]]; then
131 allowed_nonopt_words=$(( $allowed_nonopt_words + 1 ))
132 fi
133 ;;
134 *)
135 allowed_nonopt_words=$(( $allowed_nonopt_words - 1 ))
136 ;;
137 esac
138 done
139
140 cur=${COMP_WORDS[COMP_CWORD]}
141 prev=${COMP_WORDS[COMP_CWORD-1]}
142
143 case $cur in
125 -*)144 -*)
126 COMPREPLY=( $(compgen -W "-h -V" -- ${COMP_WORDS[COMP_CWORD]}) )145 COMPREPLY=( $(compgen -W "$opts" -- $cur) )
146 ;;
147 *)
148 if [[ "$prev" == "-p" ]]; then
149 _filedir
150 fi
127 ;;151 ;;
128 esac152 esac
129}153}
130154
131complete -F _ovinstanceadd ovinstanceadd155complete -F _ovinstanceadd $filenames ovinstanceadd
132156
133# ovimport [-h] [-V] [-q] [-f] [-t target] [-c imported|all|none] [-r] ROUTINES [-g] GLOBALS INSTANCE_NAME157# ovimport [-h] [-V] [-q] [-f] [-t target] [-c imported|all|none] [-r] ROUTINES [-g] GLOBALS INSTANCE_NAME
134_ovimport()158_ovimport()
@@ -139,8 +163,8 @@
139 COMPREPLY=()163 COMPREPLY=()
140164
141 for i in `seq $COMP_CWORD`; do165 for i in `seq $COMP_CWORD`; do
142 # we've run out of the allowed number of non-option arguments; perform166 # we've run out of the allowed number of non-option arguments; perform
143 # no further completion167 # no further completion
144 if [ $allowed_nonopt_words -eq 0 ]; then168 if [ $allowed_nonopt_words -eq 0 ]; then
145 return169 return
146 fi170 fi
@@ -149,9 +173,9 @@
149 -*)173 -*)
150 # if one of the arguments so far is -h or -V, perform no further completion174 # if one of the arguments so far is -h or -V, perform no further completion
151 if [ x"${COMP_WORDS[i]}" = x"-h" ] || [ x"${COMP_WORDS[i]}" = x"-V" ]; then175 if [ x"${COMP_WORDS[i]}" = x"-h" ] || [ x"${COMP_WORDS[i]}" = x"-V" ]; then
152 # if we just return here, -h won't complete the space176 # if we just return here, -h won't complete the space
153 # afterward; use a hack to exit on the next iteration of177 # afterward; use a hack to exit on the next iteration of
154 # the loop178 # the loop
155 allowed_nonopt_words=0179 allowed_nonopt_words=0
156 elif [ x"${COMP_WORDS[i]}" = x"-t" ] || [ x"${COMP_WORDS[i]}" = x"-c" ] || [ x"${COMP_WORDS[i]}" = x"-r" ] || [ x"${COMP_WORDS[i]}" = x"-g" ]; then180 elif [ x"${COMP_WORDS[i]}" = x"-t" ] || [ x"${COMP_WORDS[i]}" = x"-c" ] || [ x"${COMP_WORDS[i]}" = x"-r" ] || [ x"${COMP_WORDS[i]}" = x"-g" ]; then
157 allowed_nonopt_words=`expr $allowed_nonopt_words + 1`181 allowed_nonopt_words=`expr $allowed_nonopt_words + 1`
@@ -196,8 +220,8 @@
196 COMPREPLY=()220 COMPREPLY=()
197221
198 for i in `seq $COMP_CWORD`; do222 for i in `seq $COMP_CWORD`; do
199 # we've run out of the allowed number of non-option arguments; perform223 # we've run out of the allowed number of non-option arguments; perform
200 # no further completion224 # no further completion
201 if [ $allowed_nonopt_words -eq 0 ]; then225 if [ $allowed_nonopt_words -eq 0 ]; then
202 return226 return
203 fi227 fi
@@ -206,9 +230,9 @@
206 -*)230 -*)
207 # if one of the arguments so far is -h or -V, perform no further completion231 # if one of the arguments so far is -h or -V, perform no further completion
208 if [ x"${COMP_WORDS[i]}" = x"-h" ] || [ x"${COMP_WORDS[i]}" = x"-V" ]; then232 if [ x"${COMP_WORDS[i]}" = x"-h" ] || [ x"${COMP_WORDS[i]}" = x"-V" ]; then
209 # if we just return here, -h won't complete the space233 # if we just return here, -h won't complete the space
210 # afterward; use a hack to exit on the next iteration of234 # afterward; use a hack to exit on the next iteration of
211 # the loop235 # the loop
212 allowed_nonopt_words=0236 allowed_nonopt_words=0
213 fi237 fi
214 ;;238 ;;

Subscribers

People subscribed via source and target branches