lazygit
lazygit copied to clipboard
Variable {{line}} cannot be used
Describe the bug {{line}} won't be parsed into line numbers as before after I update lazygit version(0.40.2)
To Reproduce
- Config,$LAZYGIT_FILE is an environment variable.
os:
openCommand: 'if [ $LAZYGIT_FILE ];then echo "{{filename}} {{line}}" > $LAZYGIT_FILE;fi'
- Open lazygit and Press the o key.
- It shows this in the lower right corner
Expected behavior
- I used the previous version(0.35), and it looked like this.
Version info:
commit=5e388e21c8ca6aa883dbcbe45c47f6fdd5116815, build date=2023-08-07T14:05:48Z, build source=binaryRelease, version=0.40.2, os=linux, arch=amd64, git version=2.34.1
Duplicate of #2589.
The conclusion in that issue is that removing {{line}}
support from the o
command was by design, and we won't change that for now.
However, we will offer a {{line}}
variable for custom commands, so that you can bind your command to a custom command instead of to the open
command. This hasn't happened yet, though...
But my e key has other editors to use and used habits, this is completely used to facilitate the opening of the outer vim editing files, whether there is a configuration so that the o key and e key functions can be completely exchanged?
As I said, once we offer {{line}}
to custom commands, you will be able to configure a custom command that does the same thing as o
did in your pre-0.38 configuration, and bind that command to o
. Your use of e
is unaffected by this.