FR: make $left
and $right
environment variables expand to full file path to improve diffing integration in vscode and winmerge
#3696
Labels
polish🪒🐃
Make existing features more convenient and more consistent
Per https://martinvonz.github.io/jj/v0.17.1/config/, when handling diffing operations (e.g.
jj diff
,jj split
,jj squash -i
),$left
and$right
are expanded to directories. This happens even when a single file is given as argument to the command. However, vscode's diffing option (-d
) only knows how to handle file paths; passing directory paths to it results in (produced byjj diff -r <rev> test.txt
):The left and right directories are simply added to the workspace and no diff view is produced. Also, this overwrites the entire workspace despite passing
--reuse-window
to vscode. This is more of a vscode issue, but it can be avoided had we used the full file path instead.For winmerge,
jj diff -r <rev> test.txt
results in:Double-clicking the file entry produces the diff view, but we could have accessed it directly had we used the full file path instead.
When multiple files are changed in a commit, expanding
$left
and$right
to directories makes sense if users don't specify which file they want to target. But if they do, then it would be great to expand to the full file path so that they can directly access the file diff.The TOML settings I used:
The text was updated successfully, but these errors were encountered: