4 ms·
Unix shell utilities as an idea/philosophy are a really good IDE, but in practice a lot of them need major UX overhauls. `find` is awful, for example, if only b
by dawnofdusk 3y ago
Unix shell utilities as an idea/philosophy are a really good IDE, but in practice a lot of them need major UX overhauls. `find` is awful, for example, if only because it uses single hyphens followed by full words for it's flags (different from almost all other conventions...)
Doing anything which involves more than one pipe or xargs is just painful. Bash as a language is not ergonomic at all.
I don't know if there's a nice alternative that keeps the same spirit. My feeling is something like emacs + eshell (a shell which can execute elisp expressions)? Elisp is not a very ergonomic language either, of course... but something like this.
VSCode was a revolution in giving an IDE with a good UI, every feature one could want, and fairly good performance. In 2023, I feel like everyone's on containerized/distributable work flows so there is a big need to actually return to "UNIX as IDE" type work, and now would be a great time for some new CLI tools that improve on the past.
- berkes 3y agoMany (most?) of them have been overhauled with success. For find there is fd[1]. There's batcat, exa (ls), ripgrep, fzf, atuin (history), delta (diff) and many more. Most are both backwards compatible and fresh and friendly. Your hardwon muscle memory still of good use. But there's sane flags and defaults too. It's faster, more colorful (if you wish), better integration with another (e.g. exa/eza or aware of git modifications). And, in my case, often features I never knew I needed (atuin sync!, ripgrep using gitignore). 1 https://github.com/sharkdp/fd https://github.com/sharkdp/fd
- madog 3y agoThere are modern alternatives to many of the classic utils e.g. `fd` for find, with better CLI args and other improvements ripgrep for grep also comes to mind
- petepete 3y agoI've totally switched to the newer, dev-orientated variants for my work. fd, sd, ag/rg, fzf, bat, xh/httpie all work how I'd expect them to and I don't need any archaic knowledge. Plus, fish's autocomplete does fill in blanks when I need it. I'd kind of consider tmux to be my ide rather than Unix. That's where I combine everything above (along with nvim), and it's as integrated as I need it to be.
- pletnes 3y agoCool, didn’t know about sd before. The missing part is a more modern awk somehow.
- berkes 3y ago> and it's as integrated as I need it to be Same for me. The "pipe streams of text" is so very powerful, I doubt anything can replace it. Obviously, the "streams of text" need to make sense and have somewhat consistent structure - which most older tools don't really do - some mix tabs and spaces, others offer very little consistency between e.g. --verbose and normal. And modern ones often forego entirely. I hate it that docker pumps giant datastructures of JSON. And jq helps a lot there. Or ansible that has genormous blobs of json, mixed with yaml placed inside - I kid you not, cowsay - outputs. What I really want is just text, that I can minimize with flags and is delimited with spaces and newlines, so that a grep, cut, sed, sort, uniq, and, if all else fails, awk, can map/reduce me the data I need. Simple text streams. If we can have that, we can bind everything togethe and "build" IDE features that no IDE can offer me without severe programming, plugins or other shenanigans. Some things that I did this month, that I have no idea if VS code or Jetbrains can do: - git log --format=format: --name-only | grep -v '^$' | sort | uniq -c | sort -nr | head -n 10 # Give me the 10 files with the highest churn - most often edited so potentially most problematic ones. - < dev.log | grep "WARN:" | cut -d " " -f 2- | sort | uniq -c # List all warnings most occurring at the top. - git log --reverse --pretty=format:"%H" | while read commit_sha; do git checkout "$commit_sha" -- . ./lint.sh 2>> linting.log done # Loop through all commits to record all linting violations so to find commits with exceptional amounts of linting violations.