TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

76 pointsby mgliwkaalmost 3 years ago

6 comments

unhammeralmost 3 years ago
Since no one has said it yet, please always use <a href="https:&#x2F;&#x2F;www.shellcheck.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.shellcheck.net&#x2F;</a> on your scripts, you don&#x27;t want to be That Guy <a href="https:&#x2F;&#x2F;github.com&#x2F;ValveSoftware&#x2F;steam-for-linux&#x2F;issues&#x2F;3671" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ValveSoftware&#x2F;steam-for-linux&#x2F;issues&#x2F;3671</a>
评论 #31798993 未加载
评论 #31801922 未加载
评论 #31799605 未加载
评论 #31799138 未加载
评论 #31798840 未加载
评论 #31802319 未加载
评论 #31802059 未加载
goncalooalmost 3 years ago
This looks pretty cool!<p>I can&#x27;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.
评论 #31798188 未加载
MauranKilomalmost 3 years ago
&gt; the builtin types are:<p>&gt; [...]<p>&gt; boolean: a shortcut for returning a number (as numbers are booleans).<p>Can someone explain? I can understand booleans being numbers (e.g. #define TRUE 1 in C), but how are numbers booleans in bash?
评论 #31798571 未加载
nchasealmost 3 years ago
This is wild. Bravo to the author! (For the tool, and also for really funny documentation and commit history)
encryptluks2almost 3 years ago
I used to somehow think Bash scripts were ideal given that they were fairly transparent, but I&#x27;ll take a Go app or Rust program anyday now over something written in shell script. shfmt is an example.
评论 #31800557 未加载
sam_ezehalmost 3 years ago
&gt;It is also a very cursed idea taken way too far, and I do not apologize for it<p>Agreed XD<p>It&#x27;s a really nice idea but I cannot ever see myself writing bash like this