[demo] URLSearchParams function in JavaScript
YSH has a good core! I was able to do it in pure YSH, and Eggex has a
good structure.
But it needs polish! See comments at the top of the file.
[mycpp] Add assign/define annotations to control flow graph (#2022)
[osh breaking] read -0 myvar has an implicit IFS=
That is, it doesn't respect the shell quirk of these two things being
different with respect to whitespace:
read # $REPLY
read myvar
I noticed this due to the bug report about IFS= read -r, which also led
to read --raw-line
[mycpp] share if-statement special cases with all visitors (#2021)
[ysh breaking] module builtin renamed to source-guard
Because we will likely have Python-like module with 'use'.
[ysh] Use more consistent syntax for loop over stdin
for x in (stdin) {
echo $x
}
not
for x in <> {
echo $x
}
This was a pretty simple change - just add value.Stdin.
The <> syntax is now reserved. We could maybe use it for a "magic"
awk-like loop.
[refactor] Migrate more of our own scripts to OSH stdlib
[stdlib] yblocks polish, Add LIB_YSH
I realized we don't need yb-run or yb-redir. We can just use the 'try'
builtin, which is nice.
In OSH, we need nq-run and nq-redir, nq-redir-2, because we don't have
try
[stdlib] Use 'module' include guard for two.sh
Rename to yb-capture, etc.
[rename] To yblocks.ysh and devtools/byo.sh
[stdlib/ysh] Got nq-capture working in YSH!
with value.Place style, and blocks.
[stdlib/ysh] Start porting no-quotes.sh to see how it works
How about:
nq-capture-2 (&r) {
log hi
}
assert [0 === r.status]
assert ['hi' === r.stderr]
Switch to gawk for printing functions, because OSH/YSH don't have shopt
-s extdebug behavior.
[stdlib] Implement nq-redir, nq-redir-2, with tests
Add a new test file.
[devtools/xshar] Fix manifest for test-oils.xshar
Really need osh-tool deps
[stdlib/osh] task-five automatically makes the script a BYO server
Also plan out flag parsing for
byo-client run-testes
Probably should be 'byo test'
[stdlib/osh] Add nq-run for getting status only
This is necessary so set -o errexit doesn't abort the shell!
Use it in benchmarks/time-test.sh
[test refactor] Start using $LIB_OSH
Some trivial cahnges
- assert -> nq-assert
- Use bash-strict.sh, etc.
[stdlib, byo] Small tweaks to use it in the blog-code repo
Using it for "catbrain".
[doc] Examples for stream-table-process
[doc] Link to 3 new docs
- BYO is incomplete, but ready to read
- lib-osh and stream-table-process are drafts, not ready to read