More detailed description for 'exactly' error? #8301
Replies: 2 comments 3 replies
-
|
What do you get on the command line using tab completion, with just your example |
Beta Was this translation helpful? Give feedback.
-
While this is possible, we currently don't do that because for some backends like Google index accesses are expensive (and finding a solution which scales correctly is hard). This sounds similar to the request of showing all revisions which have the same prefix when the index changes for a previously unambiguous prefix.
^, summarized in the answer above. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context: I'm trying to write a command-line shortcut where I can type in a unique substring of a change subject, and the shortcut will run
jj newfor that revision.I'm writing this as a function in my
.zshrc, and I'm calling itjedfor "jj edit" since I'm using it to edit a given existing mutable commit (I am aware this somewhat diverges from the terminology used byjj edit). Note that$@in a zsh function refers to all arguments being passed in (so I can call this function without having to wrap the string in quotes).I could do it like this:
If this matches more than 1 revision, it prints this error (as expected):
For my usecase, I'd like to see some further details about which revisions matched the revset, so that I can either:
jj newwith an ID of one of the revisions, orjedwith an appropriately more-specific subject stringI've written this more complex function instead, which runs
jj log --counton the same revset to check the count, and thenjj logagain to list the revisions if the count is >1:I don't expect it's desirable to change the default behavior of
exactlyto always be more verbose, but I'm curious if it could be possible to add some kind of option for the error message to list all matching revisions?To be clear, this is not a significant issue, but I was a bit sad when I found that
jjcan't currently do everything I want here in a nice one-liner (since every other functionality I've thought up so far has been doable that way). I realize this could open a whole can of worms (e.g. what format should be used when printing those revs?), so it's fine with me if this idea doesn't get implemented, if the complexity isn't deemed worth the benefit.Or maybe there is a simpler way to get what I want already, in which case, please let me know. I expect I could implement this as a JJ alias, but it's not clear to me if that would provide any material simplification compared to this zsh function.
Thanks all!
Beta Was this translation helpful? Give feedback.
All reactions