Type-ish – A runtime type checker for bash, in bash

  • Since no one has said it yet, please always use https://www.shellcheck.net/ on your scripts, you don't want to be That Guy https://github.com/ValveSoftware/steam-for-linux/issues/3671

  • This looks pretty cool!

    I can't ever imagine using it tho :) If my bash scripts are so complex or critical that I feel the need to type check, I will probably use another scripting language where I can do that more easily while still having readable code.

  • > the builtin types are:

    > [...]

    > boolean: a shortcut for returning a number (as numbers are booleans).

    Can someone explain? I can understand booleans being numbers (e.g. #define TRUE 1 in C), but how are numbers booleans in bash?

  • This is wild. Bravo to the author! (For the tool, and also for really funny documentation and commit history)

  • I used to somehow think Bash scripts were ideal given that they were fairly transparent, but I'll take a Go app or Rust program anyday now over something written in shell script. shfmt is an example.

  • >It is also a very cursed idea taken way too far, and I do not apologize for it

    Agreed XD

    It's a really nice idea but I cannot ever see myself writing bash like this