by c0balt · 1y ago · 0 comments
While I like curl, this is highly subjective, some people just prefer a GUI that can guide you and/or be visually explored.
This whole piece also reads like someone is quite angry at people preferring a different workflow than them. Some aspects, like shell history, are also not the magic bullet they propose here as it doesn't, e. G., cover the actual responses.
Curl's ability to do almost everything is a minor curse here too as it means that any documentation (man pages, options help) is very large.
Not to detract from you point; just to say that the author is probably not as angry as this could make them seem.
This guy would say "just use bash" and ignore the average user experience.
One moment you have a properly quoted JSON string, the next moment you have a list of arguments, oops you need to escape the value for this program to interpret it right, but another program needs it to be double-escaped, is that \, \\, or \\\\? What subset of shell scripting are we doing? Fish? modern Linux bash, macOS-compatible bash? The lowest common denominator? My head is spinning already!
If I want to script something I'm writing Python these days. I've lost too much sleep over all the "interesting" WTF situations you get yourself into with shell scripting. I've never used Hurl but it's been on my radar and I think that's probably the sweet spot for tasks like this.
I guess parsing cmd line outputs would be annoying. Would be a worth while library to write
_plz() {
curl [rest of common args]
}
Then: _plz GET endpointIt’s a meme that originated with https://thebestmotherfucking.website/ or one like it.