Releases: Edd12321/zrc
Releases Β· Edd12321/zrc
v2.7
- Renamed
trapanduntraptosig trap,sig untrap; - Added
sig mask; - Added
defer; - Added
/dev/tcpand/dev/udp; - Added
coproc(coprocesses, like in Bash); - Added
bindkey -l; - Added
<>(open for both reading and writing); - Added
str <s> * <n>; - Fixed
selectbehaviour; - Fixed
arr :=not clearing the old array; - Fixed
@bugs; - Fixed
regexpbehaviour; - Made
strcomplain less, addedlist -= ...; - Less careless error handling;
readnow consumes separators the same way assh;- Made
waitbe more than justwhile (wait(NULL)) {}; - Made command lookup less slow and fixed other inefficiencies;
- Nicer job control notifications;
- Added more demos;
- Fixed issues regarding named pipe lifetimes;
- Make the shell escape
\cXin lists.
v2.6h
Hotfix for v2.6
- Fixed more job control;
- Job notifications now show the pipeline on stop/signal;
- Subshells can now be stopped, resumed, etc. in interactive mode;
fn sig<name>replaced withtrap/untrap;- Added
unfnfor deleting functions to avoid confusing use offnwith one argument; - Added async-safe signal trapping mechanism (achieved with self-pipe trick);
- Refactor everything to use incremental build;
- No more semaphores for sync.
v2.6
This is a big one, boys.
- Added regex match operator
=~in thestrcommand; fn promptis now replaced with two variables,$prompt1and$prompt2;- Cygwin support (+ some weird behaviour, and also an .ico);
- Rewrote a lot of code to use RAII and scope cleanup, replaced old-school C idioms where appropriate;
exproverhaul:**precedence and associativity change;- Added hyperbolic trig functions (e.g.
sinh,argth), all with their many worldwide aliases; - Added symbolic constants
e,pi; - Total rewrite of this command in pure C++ with a cool X-macro table for the operators, the command no longer relies on
flexandbisonbeing installed (which also lead to a slight speedup).
- Source is now compileable with only a POSIX toolchain plus ISO C++11 (I think);
- New example scripts in the
examplesfolder, they are now also installed to/usr/share/doc/zrcalongside the LICENSE and README when installing the AUR package; - Made
break/continuework withrepeat; - Stuff related to lexing:
- All looping constructs now cache the lexer's work to avoid redundant parsing;
- The lexer uses more move semantics than before;
- Fixed many gnarly job control cases, added semaphores to avoid controlling terminal race;
- Line editor now uses
pollAPI instead ofselect, to not break with big FD's; - Fixed bugs with lists where certain characters were not escaped;
- Fixed certain variables crashing the shell when exported;
- The interpreter now prints an error when a script file contains an unclosed brace/quote/square bracket.
v2.5h
v2.5
New update with a bunch of features added!
- Added
.=tosetfor string concatenation; - Added
callercommand, for Bash style stack traces; - Added
try/catchandthrow; - Added logical (non-bitwise)
^^XOR operator inexpr; >actually opens files inO_TRUNCnow (rookie mistake);fn promptno longer forces its output to stderr, user can choose where his prompt goes now;- FD management no longer does manual counting, uses
fcntlinstead; - More RAII in the codebase, reducing bugs.
v2.4
This is a very big update (also I definitely didn't just steal a bunch of Bash features)
- Added
selectlike in Bash (new control flow for simple number menus); - Added
fc, for command correction using an external text editor, as well as histfile juggling (might addhistoryin the future too); - Added
logout, which is likeexitbut only works from a login shell session; - Added login shell detection:
~/.zrc_(profile/login/logout)scripts get automatically sourced on login/logout now; make installnow puts the binary's name in/etc/shells;helpcommand souped up even more, now shows alias definitions;- Added
$ifs(input field separator) - Some bugfixes.
v2.3h
Hotfix for v2.3. Not enough features for a full version number
- Added the
getoptscommand, which works like in Bash, as well as an example. This is probably the only major addition except for some fixes in the codebase - Speaking of
getopt, the builtins that call it now use RAII to restore its special globals - Fixed
cdbehaviour if home dir not found (potential UB) - Removed opportunities for buffer overflows in the code
- Fixed integer comparisons with NaN
- Fixed some bugs in
regexp,str,read,rlimit,help - Reimplemented some ctrl flow to not use
goto - Builds with
clang++no longer complain with a lot of purple warnings
v2.3
A pretty small update, should've called it something else
- Added
apply(lambda functions) - Added
list map,list filter,list reduce(functional paradigm) - Added
cotas an alias forctginexprevaluator - Re-added some old example scripts to the repo
- Fixed custom signal handler behaviour for SIGINT and SIGTSTP
- Fixed some minor issues
v2.2
v2.2 is now done. Very few bugs remain :)
- The
helpcommand can now output the contents (script) of functions, and it can now list functions as well as builtins. - Added Tcl-style
unknowncommand. - Re-added
regexp. - Re-added
shift. - Job control improved. Scripts can actually be stopped now.
- Background eval-blocks/non-external commands are handled properly again. All commands are homogenously treated now.
- New stack-based phrase (logical line) reader, which is more robust and similar to Tcl.
v2.1
New version, though a pretty small update. Here's the new stuff in v2.1.
- Added
repeatcommand (evaluates a floor expression and uses it as a counter) - Added
sgnas a newexprmath function/operator - Fixed a buffer bug which could have led to UB
- Better arrays:
- Added
arr <a>(returns key/value pairs) - Added
arr <a> keys(returns keys) - Added
arr <a> vals(return values) - Array keys are now sorted by numeric value (if possible), or by string index otherwise
- Added
Have fun! ;)