Skip to content
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

Badly passed --pretty argument #143

Open
yvvki opened this issue Oct 12, 2024 · 3 comments
Open

Badly passed --pretty argument #143

yvvki opened this issue Oct 12, 2024 · 3 comments

Comments

@yvvki
Copy link

yvvki commented Oct 12, 2024

Running this command should yield a correct pretty formatted git log:

git log -5 --pretty=tformat:' * %C(yellow)%h%Creset %<|(72,trunc)%s %C(cyan)%cr%Creset'

However, doing the argument passed by wslgit doesn't pass the %<|(72,trunc) correctly, it would print something like this instead:

 * abc123456 %\<|(72,trunc)feat: commit message 10 minutes ago

Notice the appended \ just before the < symbol.

@andy-5
Copy link
Owner

andy-5 commented Oct 17, 2024

It seems to work just fine for me, using the exact command you posted from powershell (with git version 2.43.0 in WSL).
From cmd.exe it does only work if I change the quotes from ' to ".

However, I can't get the incorrect escaping behavior that you observed. Are you using the latest version of wslgit? Do you have any special configuration, e.g. environment variables for wslgit?

@yvvki
Copy link
Author

yvvki commented Oct 19, 2024

I tried using CMD and changed the quote as you suggested, but the appended \ still persist.
I used the latest Ubuntu (24.04.1 LTS) on WSL2 (2.3.24.0) on Windows 11 (26100.2033) and updated my packages via apt update && apt upgrade (git version 2.43.0). The I deleted my WSLENV environment variable to set it to its default but the issue still persist.

Here's my wsl --version
WSL version: 2.3.24.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.2033

I wonder what was your configuration?

@andy-5
Copy link
Owner

andy-5 commented Nov 7, 2024

Sorry for the late reply.

My configuration is almost exactly the same, except I'm on Windows 10:

> wsl --version
WSL-Version: 2.3.24.0
Kernelversion: 5.15.153.1-2
WSLg-Version: 1.0.65
MSRDC-Version: 1.2.5620
Direct3D-Version: 1.611.1-81528511
DXCore-Version: 10.0.26100.1-240331-1435.ge-release
Windows-Version: 10.0.19045.4529

Not sure what makes the difference here, I'll try to do some testing if I find some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants