aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/rc/lex.c
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-10-19 14:16:54 -0700
committerNicholas Noll <nbnoll@eml.cc>2021-10-19 14:16:54 -0700
commit6d50d5b97d49a74a8faf587ec2bbf234626adf0c (patch)
treeff09e03ad96fc873b10027120f38a2ae382ae916 /sys/cmd/rc/lex.c
parent2b53bca326decd50012883f0cff3b5316a3e100d (diff)
Feat(rc): added subshell commands and cd builtin
Slowly chipping away at a decent feature list. Subshell commands are executed by @{ ... }.
Diffstat (limited to 'sys/cmd/rc/lex.c')
-rw-r--r--sys/cmd/rc/lex.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/cmd/rc/lex.c b/sys/cmd/rc/lex.c
index 06737ba..4325882 100644
--- a/sys/cmd/rc/lex.c
+++ b/sys/cmd/rc/lex.c
@@ -191,6 +191,14 @@ yylex(void)
put1('&');
return '&';
+ case '@':
+ put1('@');
+ return Tsubshell;
+
+ case '!':
+ put1('!');
+ return Tbang;
+
case '$':
if(nextis('#')){
put2('$','#');