xparq / Space_Test

Ahh, OK, so it's "space" for a different reason... ;)
0 stars 0 forks source link

Use niceties like `$@`, `local`, `...=(*)` etc., and undo all the tedious rookie `${var}` chickening... #30

Open xparq opened 1 year ago

xparq commented 1 year ago

(Originally opened for Args (-> xparq/Args#30), but the test scripts now live here, so taking over...)

xparq commented 1 year ago

Original comments copied over from xparq/Args#30:

I mean, now that I actually looked at the ash manpage, I can be sure that $var is just fine. :) (Yyyep, it would have taken less effort to look it up upfront than all the repeatedly mistyped { and }...)

Also: non-subshell cmd grouping with {...; ...; } (mind the trailing ;!), e.g. for nicer oneliners, or common redir:

{ cmd1; cmd2; } > out

But check if it would survive an .../sh shebang in a real POSIX env (like WSL)!