code: def complete_variable(text):
      '''complete a MAVLink variable'''
      if text.find('.') != -1:
          var = text.split('.')[0]
          if var in rline_mpstate.status.msgs:
              ret = []
              for f in rline_mpstate.status.msgs[var].get_fieldnames():
                  ret.append(var + '.' + f)
              return ret
          return []
      return rline_mpstate.status.msgs.keys(f complete_variable(text):
      '''complete a MAVLink variable'''
      if text.find('.') != -1:
          var = text.split('.')[0]
          if var in rline_mpstate.status.msgs:
              ret = []
              for f in rline_mpstate.status.msgs[var].get_fieldnames():
                  ret.append(var + '.' + f)
              return ret
          return []
      return rline_mpstate.status.msgs.keys()
docs: complete a MAVLink variable