Our great sponsors
-
bash-cache
Transparent caching layer for bash functions; particularly useful for functions invoked as part of your prompt.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
ProfileGem
A shell configuration utility to compartmentalize and manage your terminal utilities and environment
-
shrc
My bashrc/shrc that supports bash, zsh, busybox ash and even Dash. ( has: OS and shell detection )
I'm pretty proud of my bash-cache utility, which implements a decorator pattern in Bash. Define a function, pass it to bc::cache, and like magic the function is wrapped with a caching layer.
And like many I've spent waaay too long messing around with my shell environment, which has wound up as ProfileGem, a modular shell environment manager, along with prompt.gem, my custom terminal prompt. Some features that stand out:
And like many I've spent waaay too long messing around with my shell environment, which has wound up as ProfileGem, a modular shell environment manager, along with prompt.gem, my custom terminal prompt. Some features that stand out:
Honestly, I left it as a gist because even though it reduces boilerplate, getopts is still not a great flag parser (e.g. only supports single-letter flags, and no type safety or other validation aside from boolean / string). I use it in my shell environment since I have lots of shell functions and I don't care to pull in a "real" parser into my shell, but if I was writing any sort of more complex standalone script I probably wouldn't use it. Check out docopt if you haven't seen it, I've been meaning to give that a whirl at some point.
Related posts
- Been meaning to share this bash memoization library for a while; it uses a decorator pattern to transparently add a caching layer to functions
- Been meaning to share this function memoization library for a while; it uses a decorator pattern to wrap functions with a transparent caching layer
- Question about Customizing Bash After a Fresh Install
- Lightweight dev tools.
- KDotfiles, a typical dotfiles project made to make life easier after post installation.