MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / sh_unwrap

Function sh_unwrap

src/pipeline/pass_shell.c:804–813  ·  view source on GitHub ↗

The command a statement runs: the body of a redirection. */

Source from the content-addressed store, hash-verified

802
803/* The command a statement runs: the body of a redirection. */
804static TSNode sh_unwrap(TSNode n) {
805 while (sh_type(n, "redirected_statement")) {
806 TSNode body = ts_node_child_by_field_name(n, TS_FIELD("body"));
807 if (ts_node_is_null(body)) {
808 break;
809 }
810 n = body;
811 }
812 return n;
813}
814
815/* The first non-option argument after argv[0]. */
816static const char *sh_first_operand(const sh_argv_t *a, int from) {

Callers 4

sh_subst_cdFunction · 0.85
sh_is_pwdFunction · 0.85
sh_eval_substFunction · 0.85
sh_pipe_runFunction · 0.85

Calls 1

sh_typeFunction · 0.85

Tested by

no test coverage detected