Quit from custom commands #4399
Unanswered
noahfraiture
asked this question in
Q&A
Replies: 1 comment
-
I use this in my helix/config.toml: g = [
":sh rm -f /tmp/lazygit-path",
":write-all",
":new",
":insert-output lazygit",
":insert-output echo \"x1b[?1049h\" > /dev/tty",
":buffer-close!",
":open %sh{cat /tmp/lazygit-path}",
":redraw",
":reload-all",
":set mouse false",
":set mouse true",
] and my lazygit config.yml: os:
# Command for editing a file. Should contain "{{filename}}".
edit: "echo {{filename}} > /tmp/lazygit-path; kill -TERM $(pidof lazygit)"
# Command for editing a file at a given line number. Should contain
# "{{filename}}", and may optionally contain "{{line}}".
editAtLine: "echo {{filename}}:{{line}} > /tmp/lazygit-path; kill -TERM $(pidof lazygit)" Works so far :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I don't see anything in the custom commands to quit lazygit. I want to integrate lazygit in helix like it can be done in yazi sxyazi/yazi#2461 and thus I have the following lazygit command
And this helix command
However the
exit
in the command doesn't work obviously because under the hood it's a command bashbash -c
and it's that process that exit. A solution is to use a signal with something like...; kill $PPID
but it's probably not the best way as generate an error.Is there another solution or is there a good signal to use ?
This is a little bit of topic but I ask here if someone know, after doing this helix trick, the terminal is buggy and pressing the escape command in lazygit doesn't exist a menu, but print
[27u
. Do you know where that comes from ?Beta Was this translation helpful? Give feedback.
All reactions