1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

test/[: rm SH_INTESTCMD; test for 'test' directly (re: cd2cf236)

Turns out there is a way to check what built-in we're running at
any time. It is done for 'let' in arith.c:
    sh.bltindata.bnode==SYSLET
For test/[, that would be (see include/builtins.h):
    sh.bltindata.bnode==SYSTEST || sh.bltindata.bnode==SYSBRACKET
This commit is contained in:
Martijn Dekker 2021-11-15 06:53:45 +01:00
parent a4375f3090
commit ef1f53b5b2
2 changed files with 2 additions and 9 deletions

View file

@ -76,7 +76,6 @@ typedef union Shnode_u Shnode_t;
#define SH_FCOMPLETE 17 /* set for filename completion */
#define SH_PREINIT 18 /* set with SH_INIT before parsing options */
#define SH_COMPLETE 19 /* set for command completion */
#define SH_INTESTCMD 20 /* set while test/[ command is being run */
#define SH_XARG 21 /* set while in xarg (command -x) mode */
/*