MCPcopy Create free account
hub / github.com/idank/explainshell / visitcommandsubstitution

Method visitcommandsubstitution

explainshell/matcher.py:470–480  ·  view source on GitHub ↗
(self, node, command)

Source from the content-addressed store, hash-verified

468 logger.info("ending group %s", g)
469
470 def visitcommandsubstitution(self, node, command):
471 kind = self.s[node.pos[0]]
472 sub_start = 2 if kind == "$" else 1
473
474 # start the expansion after the $( or `
475 self.expansions.append(
476 match_word_exp(node.pos[0] + sub_start, node.pos[1] - 1, "substitution")
477 )
478
479 # do not try to match the child nodes
480 return False
481
482 def visitprocesssubstitution(self, node, command):
483 # don't include opening <( and closing )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected