Revision c1439c1c
b/autotools/build-bash-completion | ||
---|---|---|
126 | 126 |
sw.DecIndent() |
127 | 127 |
sw.Write("}") |
128 | 128 |
|
129 |
sw.Write("_ganeti_network() {") |
|
130 |
sw.IncIndent() |
|
131 |
try: |
|
132 |
networks_path = os.path.join(constants.DATA_DIR, "ssconf_networks") |
|
133 |
sw.Write("cat %s 2>/dev/null || :", utils.ShellQuote(networks_path)) |
|
134 |
finally: |
|
135 |
sw.DecIndent() |
|
136 |
sw.Write("}") |
|
137 |
|
|
129 | 138 |
# Params: <offset> <options with values> <options without values> |
130 | 139 |
# Result variable: $first_arg_idx |
131 | 140 |
sw.Write("_ganeti_find_first_arg() {") |
... | ... | |
339 | 348 |
WriteCompReply(sw, "-W \"$(_ganeti_iallocator)\"", cur=cur) |
340 | 349 |
elif suggest == cli.OPT_COMPL_ONE_NODEGROUP: |
341 | 350 |
WriteCompReply(sw, "-W \"$(_ganeti_nodegroup)\"", cur=cur) |
351 |
elif suggest == cli.OPT_COMPL_ONE_NETWORK: |
|
352 |
WriteCompReply(sw, "-W \"$(_ganeti_network)\"", cur=cur) |
|
342 | 353 |
elif suggest == cli.OPT_COMPL_INST_ADD_NODES: |
343 | 354 |
sw.Write("local tmp= node1= pfx= curvalue=\"${optcur#*:}\"") |
344 | 355 |
|
... | ... | |
440 | 451 |
choices = "$(_ganeti_nodes)" |
441 | 452 |
elif isinstance(arg, cli.ArgGroup): |
442 | 453 |
choices = "$(_ganeti_nodegroup)" |
454 |
elif isinstance(arg, cli.ArgNetwork): |
|
455 |
choices = "$(_ganeti_network)" |
|
443 | 456 |
elif isinstance(arg, cli.ArgJobId): |
444 | 457 |
choices = "$(_ganeti_jobs)" |
445 | 458 |
elif isinstance(arg, cli.ArgOs): |
Also available in: Unified diff