-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: diff: add fileset-alias option #4962
base: main
Are you sure you want to change the base?
Conversation
The |
Ah, so to have something like |
4112a4b
to
6b1e2d3
Compare
Then they would probably have to escape it with e.g. |
Copied implementations from Since this tries to expands all
|
Correct. It's up to user to choose sane alias symbols such as The change generally looks good to me, thanks. |
6e0f91d
to
dac4b19
Compare
Implementation (of non-function) aliases should be completed, feel free to review under that assumption. Todo:
|
dac4b19
to
c293f52
Compare
Additionally, adds alias handling to cli_util. The implementation is mostly copied from the similar parts in cli/template_parser.
This propogates `[fileset-aliases]` to everywhere they're used. Chiefly, they need to be accessible inside of expressions like: jj log -T 'self.diff("...").summary()' jj log -r 'diff_contains("words", "...")'
c293f52
to
91f6e9d
Compare
Following discussion in #4961.
The original problem was wanting to hide paths from the diff view. I failed to read the docs and realize that
~patterns
are available, and already solve that.However, there are a few ergonomic issues with this:
~...
may be interpreted by the shell, so the excluded paths should be quotedCargo.lock
, etc)~root-file:Cargo.lock
)The template system provides a nice solution for frequently used commands. It would be nice if there was a similar system for filesets.
Example
Open questions:
-P
was chosen from "P"ath, but I'm not attached to it.Checklist
If applicable:
CHANGELOG.md