I'm a developer of 10 years, and use the command line for Git, Brew and a few other things, though I'm normally an IDE developer. I believe the CL is as powerful as everyone says, but what are some useful things I can use it for? I use Zsh on a Mac some of the time.
d0mine|2 years ago
- CLI encourages automation (shell commands are easier to repeat/parametrize then GUI steps) - shell instructions are more git friendly than screenshots (even if a process can't/shouldn't be automated. Commands are easier to document in a reusable/updatable way) - CLI can be used to run tests in a way similar how CI does it (more reproducible)
Command line tools are easier to extend/combine with existing pipelines (rg,jq,xargs): read input from stdin/write output to stdout, report on stderr, return non-zero code on error. It enables you to create adhoc tools that you wouldn't bother otherwise (unrelated: LLMs also have this property by making your skill set much broader (though very shallow with current LLMs)). Shell also has Forth-like property (compose with: retry, timeout, setuid, exec, xargs, env, ssh, etc) https://www.oilshell.org/blog/2017/01/13.html
pletnes|2 years ago
jay-aye-see-key|2 years ago
For #1 this blog post has some good examples of quickly chaining together commands (though personally I rarely use xargs) https://drewdevault.com/2020/12/12/Shell-literacy.html
For #2 once you’ve got a command you like, maybe one that generates a metric, you can now re-run it with ease from your history, saved text file, or an alias. You could also share it with teammates.
Please correct me if there are other ways to achieve the above, shell is the only way I know
pjmlp|2 years ago
reactordev|2 years ago
PrimeMcFly|2 years ago
I mean, surely you already know?
Anything where feeding input between different tasks, or where you want to use regex, or similar things the cl will be superior.
bongripper|2 years ago
[deleted]
bongripper|2 years ago
[deleted]
smcleod|2 years ago
Brajeshwar|2 years ago
The idea is to be able to use any computer/system/devices easily instead of one perfectly.
pjmlp|2 years ago
cnity|2 years ago
Pick any X and Y that maximises your ability to feel superior, I suppose.