Commit 73ca38e
committed
Fix
Currently `oc debug` auto-completes to files. This commit adds
auto-completion for this command. Auto-completion suggests pods and
resources that are valid for the debug command.
Implemenation is based on `completions.doPodResourceCompletion`
examples:
```
$ oc get pods
NAME READY STATUS
RESTARTS AGE
openshift-adp-controller-manager-68d8974985-gsn5b 1/1 Running 0
19d
$ oc debug [TAB]
cronjobs/ nodes/
daemonsets/
openshift-adp-controller-manager-68d8974985-gsn5b
deployments/ pods/
imagestreamimages/ replicasets/
imagestreamtags/
replicationcontrollers/
jobs/ statefulsets/
$ oc debug nodes/vcl01-hv9-ctlplane-[TAB]
nodes/vcl01-hv9-ctlplane-0.redhat.com
nodes/vcl01-hv9-ctlplane-2.redhat.com
nodes/vcl01-hv9-ctlplane-1.redhat.com
```
Signed-off-by: Saeid Askari <[email protected]>oc debug autocompletion1 parent beeaf09 commit 73ca38e
1 file changed
+61
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
213 | 215 | | |
214 | 216 | | |
215 | 217 | | |
| |||
223 | 225 | | |
224 | 226 | | |
225 | 227 | | |
226 | | - | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| |||
1349 | 1350 | | |
1350 | 1351 | | |
1351 | 1352 | | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
0 commit comments