direnv is such a godsend that I shill for it on every team and in every company now, it's such a great tool.
New(ish) command line tools
141–150 of 252 posts
Re: New(ish) command line tools
#142Ah, delta is missing! Right from the docs, it's "[a] syntax-highlighting pager for git, diff, and grep output". [1] https://github.com/dandavison/delta (edit: nevermind, somehow I missed it)
How many times have you wanted to dedup a (text) file, but definitely didn't have enough memory to perform the task? I found this one day when I had to dedup a set of .ndjson.gz files which totaled a cumulative 312 GBs. Utilizing the bloomfilter option, I was able to dedup the records without any large investment on my part.
Anyways, runiq[1], "[an] efficient way to filter duplicate lines from input, à la uniq".
It provides several ways to filter of which I almost always default to utilizing the bloomfilter implementation (`-f bloom`).
---
Re: New(ish) command line tools
#143Glad to discover fd. I've always struggled with find syntax. It's easy enough, but always kind of fiddly IME.
# fs 'foo' will find files/dirs with 'foo' anywhere in the name irrespective of case
fs() { find -iname '*'"$1"'*' ; }Re: New(ish) command line tools
#144I really like the approach of pipe-rename ( https://github.com/marcusbuffett/pipe-rename ) for renaming many files. It's especially convenient for people who can efficiently edit many lines in their favorite text editor (so everybody here, I guess). Main problem: you maybe don't do this kind of operation frequently enough to remember how it's called or how you aliased it.
Re: New(ish) command line tools
#145Has anyone made an installer/GNU type thing for the "common" ones like delta and rg? Could be a fun weekend project: Select what tooling you want, it will be installed using your package manager [ ] delta [ ] bat ...
Re: New(ish) command line tools
#146I could really use a better workflow to refine grep matches. Has anyone made a tool that combines grep (regex search) with fzf (multiple positive/negative patterns)? What I really want is something like: grep pattern1 **/* | grep pattern2 | grep -v exclude_these | grep -v also_exclude The problem is this loses filenames and context lines in the output. I want to apply several positive and negative regexes, and only a…
-H File name
-R Recursive (directories)
-n Line numberRe: New(ish) command line tools
#147It's not new but I like "Miller": > Miller is a command-line tool for querying, shaping, and reformatting data files in various formats including CSV, TSV, JSON, and JSON Lines. https://miller.readthedocs.io/en/latest/
Re: New(ish) command line tools
#148I really like the approach of pipe-rename ( https://github.com/marcusbuffett/pipe-rename ) for renaming many files. It's especially convenient for people who can efficiently edit many lines in their favorite text editor (so everybody here, I guess). Main problem: you maybe don't do this kind of operation frequently enough to remember how it's called or how you aliased it.
Re: New(ish) command line tools
#149I really like the approach of pipe-rename ( https://github.com/marcusbuffett/pipe-rename ) for renaming many files. It's especially convenient for people who can efficiently edit many lines in their favorite text editor (so everybody here, I guess). Main problem: you maybe don't do this kind of operation frequently enough to remember how it's called or how you aliased it.
Re: New(ish) command line tools
#150Earlier quoted context omitted.
direnv should have been part of unix/linux/posix environments from the start. Whenever something's install steps tell you "go add this export statement to your .bashrc" or similar, it never sat well. That sort of thing should be scoped by path, and shell independent -- exactly the thing direnv enables.
The first thing I did recently in some cleanup work for a team was set up direnv and have it auto-switch kubernetes context by location.
>have it auto-switch kubernetes context by location
Now I'm sold, thanks!