summaryrefslogtreecommitdiff
path: root/sys/src/cmd/rc/pcmd.c
AgeCommit message (Collapse)Author
2021-12-31rc: fix here document handling with quoted end-marker (thanks sigrid)cinap_lenrek
when end marker is quoted, we should not substitute. also, pcmd() needs to print the end marker without quotes.
2021-12-31rc: fix everythingcinap_lenrek
Untangle the lexer and interpreter thread state. Fix the file and line number error reporting, getting rid of Xsrcfile instruction, as the whole code block can only come from a single file, stuff the source file in slot[1] of the code block instead. Remove limitations for globber (path element limits) and be more intelligent about handling globbing by inserting Xglob instruction only when needed and not run it over every Xsimple argument list. Remove fragile ndot magic and make it explicit by adding the -q flag to . builtin command. Add -b flag for full compilation. Make exitnext() smart, so we can speculate thru rcmain and avoid the fork(). Get rid of all print(2) format functions and use io instead. Improve the io library, adding rstr() to handle tokenization, which allows us to look ahead in the already read buffer for the terminators, avoiding alot of string copies. Auto indent pcmd(), to make line number reporting more usefull. Implement here documents properly, so they can work everywhere.
2020-11-01rc: show line numbers on errorOri Bernstein
This change provides a location for errors like 'null list in concatenation'.
2020-04-18rc: fix code serialization for PIPEFD (thanks BurnZeZ)cinap_lenrek
BurnZeZ reported this the other day. It seems like if we have a pipeline that looks like: fn foo{cat < <{echo hi}} then the '<' will get merged in /env/'fn#foo'. This change fixes pcmd to add a space. It looks to me like this is the only token that can get merged this way by pcmd.
2016-06-30rc: implement 9atoms ` split {command} syntax extensioncinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen