def update_graph()

in generate_commands_from_synopsis.py [0:0]


def update_graph(cmd, graph):
    parsed = data_tools.bash_parser(cmd)
    child = parsed.children[0]
    if not isinstance(child, bashlint.nast.PipelineNode):
        return
    prev_name = ""
    for c in child.children:
        if c.is_utility():
            cur_name = c.value
        else:
            cur_name = ""
        if prev_name and cur_name:
            graph[prev_name].add(cur_name)
        prev_name = cur_name