Word i of argv is an option, assignment or count a wrapper takes before * the program: by its value, or -- the value unknown -- by its text * (env OUT="$TMP/x" prog: the assignment is no program). */
| 1365 | * the program: by its value, or -- the value unknown -- by its text |
| 1366 | * (env OUT="$TMP/x" prog: the assignment is no program). */ |
| 1367 | static bool sh_wrapper_arg(const sh_t *s, const sh_argv_t *a, int i) { |
| 1368 | const char *v = a->v[i]; |
| 1369 | if (v) { |
| 1370 | return v[0] == '-' || strchr(v, '=') || sh_numberish(v); |
| 1371 | } |
| 1372 | uint32_t b = a->span[PAIR_LEN * i]; |
| 1373 | uint32_t e = a->span[PAIR_LEN * i + SKIP_ONE]; |
| 1374 | return e > b && (s->src[b] == '-' || memchr(s->src + b, '=', e - b)); |
| 1375 | } |
| 1376 | |
| 1377 | /* The index of the program argv runs, past wrappers (time, sudo, retry N, |
| 1378 | * timeout D, env A=B, ...); -1 when argv has none. Its value may be unknown |
no test coverage detected