Revision 36e247e1 autotools/build-bash-completion

b/autotools/build-bash-completion
117 117
      sw.DecIndent()
118 118
    sw.Write("}")
119 119

  
120
  sw.Write("_ganeti_nodegroup() {")
121
  sw.IncIndent()
122
  try:
123
    nodegroups_path = os.path.join(constants.DATA_DIR, "ssconf_nodegroups")
124
    sw.Write("cat %s 2>/dev/null || :", utils.ShellQuote(nodegroups_path))
125
  finally:
126
    sw.DecIndent()
127
  sw.Write("}")
128

  
120 129
  # Params: <offset> <options with values> <options without values>
121 130
  # Result variable: $first_arg_idx
122 131
  sw.Write("_ganeti_find_first_arg() {")
......
324 333
          WriteCompReply(sw, "-W \"$(_ganeti_os)\"", cur=cur)
325 334
        elif suggest == cli.OPT_COMPL_ONE_IALLOCATOR:
326 335
          WriteCompReply(sw, "-W \"$(_ganeti_iallocator)\"", cur=cur)
336
        elif suggest == cli.OPT_COMPL_ONE_NODEGROUP:
337
          WriteCompReply(sw, "-W \"$(_ganeti_nodegroup)\"", cur=cur)
327 338
        elif suggest == cli.OPT_COMPL_INST_ADD_NODES:
328 339
          sw.Write("local tmp= node1= pfx= curvalue=\"${optcur#*:}\"")
329 340

  

Also available in: Unified diff