Since I believe the correlation of usage of these tools is high, I think they could benefit from having similarly named flags.
Since I believe the correlation of usage of these tools is high, I think they could benefit from having similarly named flags.
Not taking anything away from the tools that have been written. Just for me, the pain of learning a new tool is greater than the convenience I’d gain from using it.
Overall, I use AI shell completion so it's much smoother.
What’s the workflow like for AI shell completion?
How does it know which flag to complete for you? Do you write a description in native language (eg English) and it completes the entire command line? Or is it more one flag at a time?
Got it from here
That gives me some ideas to try myself.
That's because `-i`, while incredibly useful, is not POSIX. So when you say "POSIX tools," what you actually probably mean is, "superset of POSIX tools."
There is some agreement among the same tools as what the options in the superset actually mean, but not always, as is the case with `sed`.
Compare, for example, what `man grep` says on your system with the POSIX definition: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/g...
As for whether flags are consistent across different tools, well that's a total crapshoot. `find` uses `-L` for following symlinks while `grep` uses `-R`. Ironically, both `fd` and ripgrep use `-L`, so they are more consistent than the relevant superset-plus-POSIX tooling on at least that front.
To be clear, I mean this somewhat narrowly. Namely
> I’m too old and too lazy
I totally get that. I have a bunch of things I kinda want to learn and do, but just not enough time in the day. But I do still try to make time for these things. I did it for `tmux` (previously, `screen`) and `zsh` (previously, `bash`) and I am very happy I did. Each one cost me about a Sunday and a half, but they've been paying rewards ever since.
I guess it does make sense now that I think about it that ripgrep wouldn't do in-place edits. If ripgrep never performs writes, there's never a chance of a mistake in usage or bug in the software clobbering files in bulk.
Yeah that's exactly why it doesn't.
It is true that the `-r/--replace` flag can replace a number of `sed` and `awk` use cases. It has for me at least.
I have. But that’s one inconsistency and an edge case I rarely need to worry about.
Plus we are talking about grep here, not sed. I created my own “sed” because I got fed up with dealing different implementations of existing seds. If others use it or don’t use it then that’s their choice, not mine.
> As for whether flags are consistent across different tools, well that's a total crapshoot. `find` uses `-L` for following symlinks while `grep` uses `-R`. Ironically, both `fd` and ripgrep use `-L`, so they are more consistent than the relevant superset-plus-POSIX tooling on at least that front.
UNIX tools are a mess too. My point wasn’t that their flags are more sane than modern tools. It’s that I’ve already committed to memory the flags for the tools I use daily.
> Each one cost me about a Sunday and a half, but they've been paying rewards ever since
I spend my free time writing open source tools that solve problems I run into (like fixing the limitations with existing UNIX shells, and presently writing a new terminal emulator with a ton of features existing ones neglect). So I don’t have time to learn new tools to solve problems I don’t have.
Edit:
I just want add to my previous comment that some of my open source tools do make use of your fantastic Go libraries, such as the Unicode width library.
So I’ve really valued your contributions to open source even though I don’t personally use ripgrep specifically.
> To be clear, I mean this somewhat narrowly. Namely
>
>> I’m too old and too lazy
>
> I totally get that.I have two young children plus maintain several open source projects (like yourself) and a full time job too.
Time isn’t infinite so I focus my energy on the stuff that makes the biggest impact.
It’s not like I’m ungrateful for your contributions to open source and if you’d look at some of the stuff I’ve been building you’d see we are pretty like minded with regards to modernising the command line.
I'm not trying to convince you to do that. I already told you that your philosophy is reasonable. But I absolutely find it disappointing.
Anyway, yes, I have a kid. And all sorts of other things competing for my time. So I don't get much time to do serendipitous learning. But I try when I can. I cited two examples, but that's over a period of many years. I don't have time to do it often.
> you’d see we are pretty like minded with regards to modernising the command line
I bet we are. Maybe you are a lot more open to learning new things than you are letting on in your comments here. :-)
Edit:
> I bet we are. Maybe you are a lot more open to learning new things than you are letting on in your comments here.
Oh absolutely I’m open to learning new things.
Just recently I’ve been learning about tmux control mode (eg what iTerm2 uses for tmux integration) because I wanted to bypass tmux terminal emulation for specific escape codes, meaning I can then draw native elements inside a terminal window, such as spreadsheets, images, and code folding, while still having full tmux capabilities.
That was a “fun” ride. I plan on writing a blog about it at some point because there’s some features about tmux that I think others would be surprised to learn.
But I gave it ten minutes and ported part of https://github.com/BurntSushi/dotfiles/blob/bedf3598f2501ad5... to https://github.com/BurntSushi/dotfiles/blob/bedf3598f2501ad5...
Not much, but it took me some time to get the basics down.
One thing that stood out to me was that startup times are kinda brutal. I'm not sure if that's intended or if it's something about my environment:
$ cat /tmp/murex-test
#!/usr/bin/murex
echo $ARGV
$ time /tmp/murex-test
[
"/usr/bin/murex",
"/tmp/murex-test"
]
real 0.437
user 0.491
sys 0.110
maxmem 106 MB
faults 0
$ murex --version
murex v6.4.2063 (develop)
GPL v2
2018-2025 Laurence Morgan
That would probably be a deal breaker for me.I got murex through the AUR: https://aur.archlinux.org/packages/murex
> Oh absolutely I’m open to learning new things.
Okay then I'd say this is high contrast with your comments above!
I guess you could liken it to Powershell or JVM in that the start up is generally a one time cost if you’re using it interactively.
I could certainly invest a little time on the start up though. It wouldn’t be impossible to improve things there.
> Okay then I'd say this is high contrast with your comments above!
Is it though? I didn’t say I’m adverse to learning new things. Just that I don’t want to learn replacements for the tools I’ve already memorised.
But anyway, you’ve downloaded murex so I’ll give ripgrep go. I’m sure it’ll become a staple tool for me now I’ve committed time to it :)
The error messages did look very nice.
I have been considering dipping my toes into a less standard shell over the past few years. It is so so so hard to break away from the ubiquitous bullshit that most of us are stuck with. I have no love for the Bourne shell and its derivatives, although zsh is some nice lipstick on a very ugly pig.
The other candidates I'm aware of are fish, nushell and oils. I think nushell is the "most" different, but the last time I tried it, I bounced off of it for reasons I can't remember.
And you’re right that it wasn’t a fair a trade asking you to look at Murex in exchange for ripgrep (which is nice by the way!) but I respect that you did take a look nonetheless.
I am not sure I have ever gotten traditional "find" to do what I want on the first try, and I've had a lot of first tries. At some point you have to ask yourself, if I haven't achieved zen in X years with Y tool, maybe the problem is the tool and not me?
Why are we acting like we’re still in the 80’s and can only use tools that existed then?
I've switched to sd[1] because it basically just works as I expect every time.
its legit as simple as "fd -e png -x optimize-png {}" the only thing I dont like about fd is that for some reason it kind of forces you to do 'fd . Downloads' if you just want everything in "Downloads" which equates to 'fd {pattern} Dir1 dir2" I wish you could omit the pattern sometimes.
For example, I'm used to glob patterns but the glob flag (-g) works differently in fd and rg. I think that fd's -g flag does not use "full-path" globbing while rg's -g does (or the other way around). To get fd to use rg style globs, it also needs the -p flag, which rg also recognizes but it has a completely different meaning for rg and has nothing to do with how globbing/filename matching works.
I guess I'm used to the warts at this stage, like I had gotten used to the warts on find and grep all those years ago.
Difficult or impossible to fix these inconsistencies at this stage without breaking backward compatibility.