New(ish) command line tools
171–180 of 252 posts
Re: New(ish) command line tools
#172I 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.
ls | % {rename-item $_ -newname $('myfile_' + ($_.BaseName -replace '\D') + '.md' )} No need to remember anything.
Re: New(ish) command line tools
#173I'd like a command line tool that could transform `history` into a list of alternate tool recommendations. Bonus if it could also generate recommended aliases and functions according to your habits.
Re: New(ish) command line tools
#174direnv is such a godsend that I shill for it on every team and in every company now, it's such a great tool.
I read through the direnv docs, but I'm trying to think of how I'd use it. Can you or anyone else give me some examples? Even just listing which directories you have .env or .envrc files in, and what environment variables you use in them.
Kind of imagine if git didn't change repo when you switched directory, that was how it felt.
Re: New(ish) command line tools
#175I'm a big fan of jo[1] for making generating JSON from the shell not terrible. [1] https://github.com/jpmens/jo
Re: New(ish) command line tools
#176For me it's the best complement for a command line focused git usage, because it offers a far better (but still streamlined) experience for staging chunks than "git add -i", through its "tig status" TUI interface.
One thing that I never bothered to research if it can be modified and the defaults bother me a little is that it does not use vim keybindings (gf for loading a commit, for example).
Re: New(ish) command line tools
#177I 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.
My approach is something like $ ls / find # tweak until I have a list of things to rename $ for file in $(ls / find...); do echo "mv $file $(echo $file | sed ... )"; done # this prints mv commands for renaming, I can inspect them as needed $ for file in $(); do...; done | sh # execute the renaming It is inspectable, easy to cancel (just don't pipe to shell), incremental... just needs wrangling with bash etc. which is…
Re: New(ish) command line tools
#178A simple trick I only figured recently is following logs with fuzzy search: tail -f /var/log/foo.log | fzf +s Or something similar for output from a dev server: make serve | fzf --ansi +s
Speaking of logs, angle-grinder is amazing: https://github.com/rcoh/angle-grinder
Re: New(ish) command line tools
#179Is anyone aware of any other comparable shell tool for tailing a set of logs?
Re: New(ish) command line tools
#180A simple trick I only figured recently is following logs with fuzzy search: tail -f /var/log/foo.log | fzf +s Or something similar for output from a dev server: make serve | fzf --ansi +s
fzf is a wonderful little tool. I use this script so much: git branch | fzf | xargs git checkout