-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
- GitLens Version: v12.1.1
- Git Version: 2.36.1
- VSCode Version: Codium 1.68.1
- OS Version: Arch Linux
Steps to Reproduce:
- Use the xonsh shell.
- Start an interactive rebase
- GitLens will then call this in the integrated shell:
git -c sequence.editor="codium --wait --reuse-window" rebase --interactive COMMITHASH - It fails with the following error message:
hint: Waiting for your editor to close the file... "codium --wait --reuse-window": line 1: codium --wait --reuse-window: command not found
error: There was a problem with the editor '"codium --wait --reuse-window"'.
As far as I understand, this is due to xonsh not removing quotes inside arguments, so git will actually receive 'sequence.editor="codium --wait --reuse-window"' as argument. It will therefore try to call a binary file named "codium --wait --reuse-window", which fails for obvious reasons.
bash on the other hand removes quotes inside arguments and calls git with 'sequence.editor=codium --wait --reuse-window' as argument, which works fine.
See my previous issue over at xonsh and the xonsh manual.
The fix would be easy: Just change the quotes in Line 99 in rebase.ts to cover the entire argument, like this: configs = ['-c', `"sequence.editor=${editor}"`];. This would still work in shells like sh and bash, but also in xonsh, and I'd argue that it's more correct anyway.
I understand you can't prioritize compatability with uncommon shells, but as the fix is easy and shouldn't have any downsides, I hope you'll consider it. I can make a corresponding PR if you wish, of course.