Commit 4fac7e1
committed
Determine whether to add a subparser to completion by its presence in _get_subactions()
This is the logic argparse uses for showing a subparser in the list of
options, so shtab now matches that behavior. This is particularly important
for subparsers which pass `add_help=False` in order to provide their *own*
help implementation.1 parent 76c5ead commit 4fac7e1
2 files changed
+43
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
144 | 154 | | |
145 | 155 | | |
146 | 156 | | |
| |||
204 | 214 | | |
205 | 215 | | |
206 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
207 | 220 | | |
208 | 221 | | |
209 | 222 | | |
| |||
222 | 235 | | |
223 | 236 | | |
224 | 237 | | |
225 | | - | |
| 238 | + | |
226 | 239 | | |
227 | 240 | | |
228 | 241 | | |
| |||
577 | 590 | | |
578 | 591 | | |
579 | 592 | | |
| 593 | + | |
580 | 594 | | |
581 | | - | |
| 595 | + | |
582 | 596 | | |
583 | 597 | | |
584 | 598 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
197 | 222 | | |
198 | 223 | | |
199 | 224 | | |
| |||
213 | 238 | | |
214 | 239 | | |
215 | 240 | | |
216 | | - | |
| 241 | + | |
217 | 242 | | |
218 | 243 | | |
219 | 244 | | |
| |||
0 commit comments