equal
deleted
inserted
replaced
|
1 // Copyright 2013-2022 The Cobra Authors |
|
2 // |
|
3 // Licensed under the Apache License, Version 2.0 (the "License"); |
|
4 // you may not use this file except in compliance with the License. |
|
5 // You may obtain a copy of the License at |
|
6 // |
|
7 // http://www.apache.org/licenses/LICENSE-2.0 |
|
8 // |
|
9 // Unless required by applicable law or agreed to in writing, software |
|
10 // distributed under the License is distributed on an "AS IS" BASIS, |
|
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
12 // See the License for the specific language governing permissions and |
|
13 // limitations under the License. |
|
14 |
1 package cobra |
15 package cobra |
2 |
16 |
3 import ( |
17 import ( |
4 "bytes" |
18 "bytes" |
5 "fmt" |
19 "fmt" |
148 |
162 |
149 __%[1]s_handle_special_char "$cur" : |
163 __%[1]s_handle_special_char "$cur" : |
150 __%[1]s_handle_special_char "$cur" = |
164 __%[1]s_handle_special_char "$cur" = |
151 |
165 |
152 # Print the activeHelp statements before we finish |
166 # Print the activeHelp statements before we finish |
153 if [ ${#activeHelp} -ne 0 ]; then |
167 if [ ${#activeHelp[*]} -ne 0 ]; then |
154 printf "\n"; |
168 printf "\n"; |
155 printf "%%s\n" "${activeHelp[@]}" |
169 printf "%%s\n" "${activeHelp[@]}" |
156 printf "\n" |
170 printf "\n" |
157 |
171 |
158 # The prompt format is only available from bash 4.4. |
172 # The prompt format is only available from bash 4.4. |