Live data from Hacker News

CLI: Improved

remysharp.com

71–80 of 280 posts

Re: CLI: Improved

#71
post #63

Earlier quoted context omitted.

>We have a whole working group this year focused on making the experience of writing CLIs awesome Can you explain what you mean by this? Something like the people are going to focus on language and library features that help with writing CLIs? Or something else? Asking because CLIs are one of my interests.

Here is the Rust CLI working group announcement: https://internals.rust-lang.org/t/announcing-the-cli-working... Rust has different community working groups that focus on improving the Rust ecosystem in different ways this year: https://internals.rust-lang.org/t/announcing-the-2018-domain...

Thank you, will take a look.

Re: CLI: Improved

#73
post #29

Is anyone else impressed with the quality (and speed!) of some of the tools written in Rust? I'm an avid user of fd and bat, the former being ridiculously fast. Often I find something on github, I'm impressed by the quality of the documentation, features, UI etc, then lo and behold it's written in Rust. Another one potentially for this list is tokei[1] I was trying to count the code in our repos at work and used the…

I had a case where tar was too slow for my needs. Rust did let me cobble the right syscalls and threads together to make it more HDD-friendly and faster while forcing me to handle all the gritty filesystem error cases from the start. Lo and behold, about 4 times faster on an idle system and orders of magnitude faster on a busy system. It just would not have been possible to do it by combining shell utilities and too finicky in C.

Re: CLI: Improved

#74

I was wondering if any of you use alternatives or hacks for the cd command? I've been testing out a couple of different ones, like xd, fcd, wcd and pushd/popd, but I'm not quite sure which I should commit to or if there are better ways :)

Here's another that I use daily: https://github.com/clvv/fasd

You can even combine that with the aforementioned `fzf`: https://github.com/junegunn/fzf/wiki/examples#with-fasd-1

Re: CLI: Improved

#75

I feel like these tools very much go against the Unix philosophy of "Write programs that do one thing and do it well". They try to do the pretty user interface and the underlying operation in a single tool. I prefer PowerShell in this respect where the output of each command is not text streams (as in the Unix world) but objects which can be operated on in a more object oriented way. You spend less time thinking abou…

How should ls coloring work in your view? ls just does the file system reading and then some other tool parses the ls output matches some expressions and adds color? Or something like that?

I suppose it's just a generic colorizer tool that takes a configuration file of expressions and arbitrarily colors data feed through it?

Re: CLI: Improved

#76
post #72

Another tool I use religiously: `autojump` (aliased to `j`) rather than `cd`. It learns where you go and lets you fuzzy-jump there. https://github.com/wting/autojump I also use `loop`, my own Rust-based replacement to bash's native loops: https://github.com/Miserlou/Loop

ZSH's z plugin does the same thing. Highly recommended for the ZSH users out there!

https://github.com/rupa/z

Re: CLI: Improved

#77
post #28

GNU Parallel is the first thing I usually install on top of a standard Unix userland. It's almost a superset of xargs, with many interesting features. It depends on perl, though. htop is also pretty much a great replacement for top. And ripgrep a great replacement for the find | xargs grep pattern. Aside from that, I'm pretty content with the Unix userland. It's remarkable how well tools have aged, thanks to being co…

> Tools like e.g. mutt are little silos and don't compose that well. I've migrated to emacs, where the userland is much more composable.

What do you use for reading email in Emacs?

Re: CLI: Improved

#78

Earlier quoted context omitted.

I think you should check out Powershell.

This made me chuckle, because it's incredibly accurate. I started with bash and am still naturally more comfortable there for general purpose work. PowerShell is annoyingly verbose sometimes and has its own WTF moments, but there are waaay fewer surprises when working with complex scripts and variables.

It’s not included anywhere, but PowerShell is open source and you can install it on *nix now! Obviously the things that integrate with Windows aren’t there, but the object-oriented pipelining sure is.

Re: CLI: Improved

#79
post #69

Re: bat > cat Cat is just a tool to dump files to stdout and maybe concatenate them. If you want paging, syntax highlighting, etc, you probably want a tool to replace `less`, not `cat`.

I don't know about bat vs cat, but fcat is actually kind of impressive..

https://github.com/mre/fcat

Re: CLI: Improved

#80
post #72

Another tool I use religiously: `autojump` (aliased to `j`) rather than `cd`. It learns where you go and lets you fuzzy-jump there. https://github.com/wting/autojump I also use `loop`, my own Rust-based replacement to bash's native loops: https://github.com/Miserlou/Loop

I've found fasd (https://github.com/clvv/fasd) to be the most featureful of the directory jumping tools, and it's much faster than autojump as well.

I'd be remiss not to mention pazi however, which is the tool I wrote to replace fasd in my own workflow: https://github.com/euank/pazi

It's similar to autojump, but much faster: https://github.com/euank/pazi/blob/master/docs/Benchmarks.md...

Oh, and it's written in rust :)

Post reply on HN