Implement $(cmd) subcommand syntax in commands (issue #27)
Add $() for inline subcommand substitution that runs a command and
inserts its stdout (trailing newlines stripped) into the outer command
string. Supports nesting, and mixing with ${expr} and $NAME.
This commit is contained in:
4
lcmd.h
4
lcmd.h
@@ -14,11 +14,13 @@
|
||||
#define LUSH_OP_INTERACTIVE 1
|
||||
#define LUSH_OP_GETENV 2
|
||||
#define LUSH_OP_SETENV 3
|
||||
#define LUSH_OP_COUNT 4
|
||||
#define LUSH_OP_SUBCMD 4
|
||||
#define LUSH_OP_COUNT 5
|
||||
|
||||
int lushCmd_command (lua_State *L);
|
||||
int lushCmd_interactive (lua_State *L);
|
||||
int lushCmd_getenv (lua_State *L);
|
||||
int lushCmd_setenv (lua_State *L);
|
||||
int lushCmd_subcmd (lua_State *L);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user