def autocomplete_getarg(line):
    """
    autocomplete passes in a line like: get_memory arg1, arg2
    the arg2 is what is being autocompleted on so return that
    """
    # find last argument or first one is seperated by a space from the command
    before_arg = line.rfind(',')
    if(before_arg == -1):
        before_arg = line.find(' ')
    
    assert before_arg >= 0
    
    # assign the arg. it skips the deliminator and any excess whitespace
    return line[before_arg+1:].lstrip()