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

Function sh_first_operand

src/pipeline/pass_shell.c:816–824  ·  view source on GitHub ↗

The first non-option argument after argv[0]. */

Source from the content-addressed store, hash-verified

814
815/* The first non-option argument after argv[0]. */
816static const char *sh_first_operand(const sh_argv_t *a, int from) {
817 for (int i = from; i < a->n; i++) {
818 if (a->v[i] && a->v[i][0] == '-' && a->v[i][SKIP_ONE]) {
819 continue;
820 }
821 return a->v[i];
822 }
823 return NULL;
824}
825
826/* $(dirname ..), $(basename ..), $(pwd), $(realpath ..), $(readlink -f ..),
827 * $(git rev-parse --show-toplevel). */

Callers 5

sh_eval_subst_commandFunction · 0.85
sh_subst_cdFunction · 0.85
sh_kubectlFunction · 0.85
sh_deploy_commandFunction · 0.85
sh_chdirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected