6 ms·
I've been loving all the new rust-based CLI tools; you can find a lot of them here [0]. So far I've used ripgrep, fd-find, sd, exa, bat. I care less about spee
by claytonjy 5y ago
I've been loving all the new rust-based CLI tools; you can find a lot of them here [0].
So far I've used ripgrep, fd-find, sd, exa, bat. I care less about speed and more about ease-of-use and beautiful output. Another bonus is standardized tooling between Mac and Linux; little bsd differences have been driving me nuts since I took a job that forced me into a MacBook, but these tools solve that issue and are easy to install with Homebrew.
[0] https://lib.rs/command-line-utilities https://lib.rs/command-line-utilities
- idsout 5y ago> little bsd differences have been driving me nuts since I took a job that forced me into a MacBook, but these tools solve that issue and are easy to install with Homebrew. I'm in the same boat as you - I love the the rust-based CLI tools. I would also recommend installing the GNU coreutils via homebrew (https://formulae.brew.sh/formula/coreutils https://formulae.brew.sh/formula/coreutils). This lets you run the GNU coreutils by prefixing them with a `g`, like `gsed` rather than `sed`.
- claytonjy 5y agoOh that's neat, thanks. Given you also use the rust tools, where do you find yourself reaching for the g* tools?
- rank0 5y agoI use the gnu coreutils because small things like cli flags are different for the macos implementations. So for example some aliases in my .zshrc didn’t work on my MacBook. I come from a Linux background so it was nice for me to have coreutils behave exactly how I’m used to. Some people prefer gnu software for ideological reasons too. It was one of the flags for ‘ls’ in particular that made me switch. There’s a way to add the gnu coreutils to your path without the g prefix so I never even notice the difference.
- saghm 5y agoNot GP, but I'd imagine one use case would be for writing scripts to be used on other machines where the tools might not be installed, e.g. writing scripts on a mac to be run on Linux servers. If for example you want to script something for CI to be run on a Linux server, I can imagine having the GNU utilities in the default path on a Mac would be useful, since getting the Rust tools installed on the CI server is probably not worth the effort.
- nickporter 5y agoit's all about the flags, e.g. readlink -f
- nerdponx 5y agogsed -i, Make, AWK, Tar
- idsout 5y agoMainly find and sed due to muscle memory, but I've been using fd and sd more and more lately.
- rank0 5y agoThere’s a way also to remap the gnu coreutils to their normal commands without the g prefix. I did it a while ago but I can’t recall exactly how…
- makeworld 5y agoBrew will tell you how when you install the package.
- vips7L 5y ago> Another bonus is standardized tooling between Mac and Linux; This is why I just use a modern cross platform shell that has everything built in. My choice is PowerShell since I flip between Linux and Windows, Nushell is also a solid choice if you want something more Unixy.
- gnubison 5y agoThe standardized tooling is called POSIX, and you already have it installed — it’s easy enough to train the GNUisms out of your fingers and it will reward you in the end.
- nerdponx 5y agoThe standard is also the lowest common denominator. I think it's a useful skill to be able to write POSIX-only shell scripts, but in my day to day use I'd rather have the GNU extensions, knowing that they aren't portable. Plus the GNU versions of the programs generally are still portable anyway.
- qalmakka 5y agoThe best part is that most of them even work well under Windows, too, and that really is a nice breath of fresh air for a change. I always miss my tools when I am on Windows, and while I know a good deal of PowerShell it still doesn't work for me as well as "Unixy" tools.