Earlier quoted context omitted.
find doesn't return the same output as ls when run on another directory. Maybe there is a switch to do this? I'm not sure. $ mkdir -p tmp && touch tmp/a tmp/b tmp/c $ find ./tmp -maxdepth 1 -type f ./tmp/a ./tmp/c ./tmp/b $ ls -1 ./tmp a b c
I think this is what you are looking for $ find ./tmp -maxdepth 1 -type f -printf '%f\n'
Moreutils – Unix tools that nobody thought to write (2012)
111–120 of 225 posts
Re: Moreutils – Unix tools that nobody thought to write (2012)
#112There's a few programs I wish were standard on all Unix systems by now: * tree - print directory structure * bat - cat, but actually designed for reading files. Syntax highlighting, line numbers, automatic paging. * rg - better grep * direnv - local environment variables
`less` not good enough?
Re: Moreutils – Unix tools that nobody thought to write (2012)
#113There's a few programs I wish were standard on all Unix systems by now: * tree - print directory structure * bat - cat, but actually designed for reading files. Syntax highlighting, line numbers, automatic paging. * rg - better grep * direnv - local environment variables
Good list of things you can install to better your CLI experience, but I am not sure if I agree that they fill out missing features. Why is bat better than less? I admit to catting files for reading as much as the next guy, but I almost always have the tiniest regret that I didn’t feed it into less and kept my terminal cleaner. As for RG and AG. other than being faster, how are they better? I thought they were api co…
Could you please let me know how you came to that understanding? Because I'd really like to fix it. ripgrep was never intended to be POSIX compatible. It would have been a straight-jacket over its functionality. See: https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#pos...
> As for RG and AG. other than being faster, how are they better?
For ripgrep at least, a lot of it comes down to speed, better output formatting by default and suppressing results you probably don't want by default (but that can be turned off quite easily).
But there are other features, like better Unicode support, built-in support for searching compressed files, support for file types and a few other things. The README includes a bit more. ;-)
Re: Moreutils – Unix tools that nobody thought to write (2012)
#114Re: Moreutils – Unix tools that nobody thought to write (2012)
#115Earlier quoted context omitted.
I think that's the default behaviour in Zsh or Fish if you press tab.
Probably immediate subdir. What I am talking about is universal jump-to-anywhere. Like I have subdir "/media/tnoko/sdc1/capture/Roinaa/". "ncd Roi" should be totally sufficient and unique command to go there.
Re: Moreutils – Unix tools that nobody thought to write (2012)
#116Re: Moreutils – Unix tools that nobody thought to write (2012)
#117The sponge example: sed "s/root/toor/" /etc/passwd | grep -v joey | sponge /etc/passwd I think it can be rewritten as: sed -n '/joey/! s/root/toor/p' -i /etc/passwd
Re: Moreutils – Unix tools that nobody thought to write (2012)
#118There's a few programs I wish were standard on all Unix systems by now: * tree - print directory structure * bat - cat, but actually designed for reading files. Syntax highlighting, line numbers, automatic paging. * rg - better grep * direnv - local environment variables
>cat, but actually designed for reading files. Syntax highlighting, line numbers, automatic paging. // `less` not good enough?
Re: Moreutils – Unix tools that nobody thought to write (2012)
#119sponge can be replaced with dd
Other than that, yeah nice ideas. And very much in the unix spirit of one tool to do one thing.
Re: Moreutils – Unix tools that nobody thought to write (2012)
#120Earlier quoted context omitted.
>cat, but actually designed for reading files. Syntax highlighting, line numbers, automatic paging. // `less` not good enough?
I’ve never seen syntax highlighting in “less”.