feat(open): support for new openInTerminal config option (behaves the same as editInTerminal but then for the open key binding)#5624
Open
ramonvermeulen wants to merge 1 commit into
Conversation
60f1fb8 to
932042f
Compare
openInTerminal to behave the same as editInTerminal but then for the open bindingopenInTerminal to behave the same as editInTerminal but then for the open key binding
openInTerminal to behave the same as editInTerminal but then for the open key bindingopenInTerminal config option (behaves the same as editInTerminal but then for the open key binding)
…nTerminal` but then for the `open` binding
932042f to
5a97314
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Closes #5623
This PR add support for
openInTerminalin the same way that there is support foreditInTerminal. When this value is set totrue, lazygit will suspend until the configuredopenprocess returns, when the value is set tofalsebehavior stays the same as is.I decided to keep the naming conventional to
editInTerminal, even thougheditInTerminalis named as is for backwards compatibility. Otherwise you would havesuspendOnOpenandeditInTerminalwhich doesn't really pair well, I'm fine renaming if that is desried.Additional context: #5622
Please check if the PR fulfills these requirements
go generate ./...)Manual testing
I manually tested with the following configs:
With
openInTerminal: trueand a terminal based editor providedWith this config
opennow behaves the same aseditin combination witheditInTerminal, and I am able to open neovim within the same terminal session and after closing be back in lazygit because of the suspend functionality.With
openInTerminal: falseand a terminal based editor providedFor me this freezes
lazygitand I have to close the app manually, this is the same behavior as what is currently onmain.With
openInTerminal: falseand a no editor providedStill keeps the original behavior, taking the system default via
open --and launching the default editor in a new process. In my case this opens the file in a GUI based editor in another process (in my case zed).