TickTick icon indicating copy to clipboard operation
TickTick copied to clipboard

Run shellcheck and some more manual fixes

Open Artoria2e5 opened this issue 4 years ago • 6 comments

  • ARGV is now an array. Should fix #32.
  • Quotes and stuff, also in generated code.
  • Not using ... is a good idea because it effs up badly when you nest them. It's also in shellcheck.
  • Catch bad args in tickVars. And don't exit on help -- you are a function, act like one.

POSIX interaction, in case people want it later:

  • No arrays, but we aren't gonna do the transpiling anyways.
  • No +=, so it's gonna be dreadfully slow for long args. Remember the quadratic string append stuff in JS? Yeah it's exactly that.
  • No ${var/pat/sub}, so dreadfully slow again. Prefix and suffix trimming is available though.
  • No (( ... )), but [ "$(( ... ))" -ne 0 ] is the same. Except for ++.
  • No <<<, so I am effing myself up.

In addition, echo is a wack, but we can always roll our own with printf.

Artoria2e5 avatar May 28 '20 14:05 Artoria2e5