6 ms·
bat [0] (a cat replacement) and fzf [1] are the other two I would miss dearly, standing above some other "new" tools I use very regularly. [0]: https://githu
by RBerenguel 5y ago
bat [0] (a cat replacement) and fzf [1] are the other two I would miss dearly, standing above some other "new" tools I use very regularly.
[0]: https://github.com/sharkdp/bat
[1]: https://github.com/junegunn/fzf
- kasbah 5y agoMine are fd [0] to replace `find` and tldr [1] to replace `man`. [0]: https://github.com/sharkdp/fd https://github.com/sharkdp/fd [1]: https://tldr.sh/ https://tldr.sh/
- jjice 5y agofd is fantastic as well, and I can get away with tldr 80% of the time before diving into man.
- mananaysiempre 5y agoHave you looked at the original man pages for 7th ed. (http://man.cat-v.org/unix_7th http://man.cat-v.org/unix_7th) or Plan 9 (http://man.cat-v.org/plan_9_3rd_ed http://man.cat-v.org/plan_9_3rd_ed)? They’re basically tldr with less examples, and exhaustive, except there’s so much less stuff to exhaust. I was both pleasantly surprised by how simple they are and unpleasantly surprised by how far we’ve fallen in terms of complexity (though my recent comment https://news.ycombinator.com/item?id=27498189 https://news.ycombinator.com/item?id=27498189 explains why that’s an oversimplification). The GNU man pages (where they even exist) or the POSIX ones are a usability abomination in comparison. Even BSD’s are still quite bad.
- papaf 5y agoI find repgrep defaults sensible when searching for text but fd misses files that I expect it to find -- this has happened a few times now and I have gone back to find. For instance: 'fd .apk' to search for android builds.
- mananaysiempre 5y agoUnlike find, fd follows the rg approach of respecting VCS ignores, which does have both advantages and disadvantages. But if you know you’re specifically searching for a binary, just pass -u (once to include VCS-ignored files, or even twice to also include hidden ones) and you’re golden. In your specific example you probably also want -F (fixed string) or -g (glob), because fd does regexes by default and I doubt you want to type '\.apk'. As to find, its flexibility certainly comes handy on occasion, but... find: paths must precede expression Aaaargh.
- virgoerns 5y agoI like cheat.sh as the alternative for tldr which doesn't need to be installed as all, because it can be used with curl: $ curl cheat.sh/tar
- jjice 5y agofzf is another that is just absurdly powerful. fzf comes in handy in so many useful little scripts for me.
- thiht 5y agoWhat do you use fzf for? I can't figure out a use case for it but everyone seems to love it, what am I missing on?
- taude 5y agoHere's an example with rip grep. Say you search for something with a lot of results, you can feed the results with a lot of answers into it, and then add additional filters. Useful for when you're not "exactly" sure what your search term needs to be. I use it when ripgrepping a lot of code bases all at once.... I also have a folder of a bunch of curl commands that I can search and apply fuzzy finding on the results that helps me explore to find. Contrived example, search for "t" in all these files and then pipe to fzf: rg t . | fzf
- lelandbatey 5y agoThe main thing I get out of it is super amazing fuzzy-search of my terminal history. Normally with bash's built in CTRL-R reverse history search, you pretty much have to know EXACTLY what you're searching for, and if there are a lot of similar commands between the most recently run match for a search and the one you're ACTUALLY searching for, you may have a really hard time finding it since you have to go backwards through the commands one at a time. For myself and many people, we were getting really good at typing `history | grep '<regex>'`, maybe with more pipes to grep for further refinement. But with fzf[1], that whole workflow of searching through your history is probably two orders of magnitude faster. Now you hit CTRL-R and you start typing any random part of the command you're trying to remember. If there was some other part of the command you remember, hit space and type that search term after the first search term. FZF will then show you the last 10-ish matches for all the search params you just typed, AND it will have done all this with no UI lag, no hitching, and lightning fast. I don't know what other people use FZF for, as this is the SINGLE feature that's so good I can't live without it anymore. [1] - https://github.com/junegunn/fzf#key-bindings-for-command-line https://github.com/junegunn/fzf#key-bindings-for-command-lin...
- kibwen 5y agoSee also delta for diffing (and as a drop-in replacement for git diff) and exa for ls. https://github.com/dandavison/delta https://github.com/dandavison/delta https://github.com/ogham/exa https://github.com/ogham/exa
- RBerenguel 5y agoYes, I have it enabled as git's diff. I have tried exa but didn't see much difference. Anything remarkable I may be missing from exa?
- revscat 5y agoIt has a flag to add a “Git” column to the output, showing the status of each file in the listing (new/modified/etc.) it also has a `—tree` flag which does exactly what you think it does. This let me remove my old `tree` command and consolidate into one.