mycmd
PPSS
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
mycmd
-
Bash functions are better than I thought
Woah, this is very cool. I may try to adopt this.
I recently discovered, similar to the author of the post for this thread, that local variables are dynamically scoped.
I have been writing a lot more shell scripts lately, using a "library" [1] of sorts I've been writing. When I was debugging one of my scripts that uses mycmd, I discovered that I had failed to declare some of my variables local and they were leaking out to the global scope.
I had recently added functionality to call a set of functions on script exit, so I added something that would output the defined variables, in hopes that I could write something that will output them at the beginning and then the end and show the difference. I was surprised when variables defined in my dispatch function [2] for those at exit functions were showing up, even though they were definitely defined as local. It was then that I dug around and discovered the dynamic scope of variables.
I've been trying to figure out how to accomplish what I desire but exclude those variables from calling functions. I haven't been able to find an obvious way to see if the variable is coming from a calling function. I might be able to use techniques like you've pointed out in your linked post to add the tracing that I want. Still need to think more on this.
---
[1] https://github.com/travisbhartwell/mycmd
PPSS
- GNU Parallel, where have you been all my life?
-
Bash functions are better than I thought
At one time, I did learn myself to write shell scripts. I even wrote this 3Kl line monstrosity [0]
However, I would strongly advice to master a proper programming language. I respect the article and the efforts of the author, but I feel that it is the past.
I mastered Python a bit and the ability to just use things like dictionaries, proper parsing libraries and such, instead of kilometers of fragile pipes, it is so much better.
I understand something like Python may feel total overkill, but that 10 line shell script suddenly needs quite a bit of error handling and some other features and before you know it, you wish you started out with python or something similar.
[0]: https://github.com/louwrentius/ppss
What are some alternatives?
hasura-ci-cd-action
basalt - The rock-solid Bash package manager.
pash - PaSh: Light-touch Data-Parallel Shell Processing
Seed - A Rust framework for creating web apps
docker-flask-example - A production ready example Flask app that's using Docker and Docker Compose.
bash2048 - 2048 in bash
oh - A new Unix shell.
stripe-jobs-cli
wrk2 - A constant throughput, correct latency recording variant of wrk
bash-core - Core functions for any Bash program.
xe - simple xargs and apply replacement