jesseduffield / jesseduffield/lazygit

promptToReturnFromSubprocess not working

Open
#1,915 5 comments 4 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Describe the bug**
I see "Press enter to return to lazygit" when `promptToReturnFromSubprocess: false`.

```sh
+ bash -c nvim "mackup/.config/nvim/nvim-config/plugins.vim"

Error detected while processing function 105_Callback[3]..17[1]..105_GetCapabilitiesResult[2]..105_AgentRequest[3]..105_Send:
line 3:
Can't send data to closed stream
Press enter to return to lazygit
```

**To Reproduce**
Steps to reproduce the behavior:
1. Open lazygit
2. Edit a file by pressing `e` on an item in the buffer (via neovim)
3. Quit neovim (`:q`)
4. See "Press enter to return to lazygit"

**Expected behavior**
The `promptToReturnFromSubprocess`, when set to `false`, is supposed to skip this message and go directly back to lazygit.

**Screenshots**
If applicable, add screenshots to help explain your problem.

Screen Shot 2022-05-05 at 11 51 00 AM

**Desktop (please complete the following information):**
- OS: macOS Monterey (v12.3)
- Lazygit Version `stable 0.34 (bottled)` (via homebrew)

```
lazygit -v
commit=, build date=, build source=unknown, version=unversioned, os=darwin, arch=arm64
```

**Additional context**
Here is my config file, I've confirmed that it is properly loading other config values.

Click to view my lazygit config file

```yml
# cSpell:ignore brightblack unstaged unstage lazygit submodule repos pgup pgdown
gui:
# stuff relating to the UI
scrollHeight: 2 # how many lines you scroll by
scrollPastBottom: true # enable scrolling past the bottom
sidePanelWidth: 0.3333 # number from 0 to 1
expandFocusedSidePanel: false
mainPanelSplitMode: 'flexible' # one of 'horizontal' | 'flexible' | 'vertical'
language: 'auto' # one of 'auto' | 'en' | 'zh' | 'pl' | 'nl'
theme:
lightTheme: false # For terminals with a light background
activeBorderColor:
- magenta
- bold
inactiveBorderColor:
- brightblack
optionsTextColor:
- brightblack
selectedLineBgColor:
- black
selectedRangeBgColor:
- yellow
cherryPickedCommitBgColor:
- blue
cherryPickedCommitFgColor:
- cyan
unstagedChangesColor:
- gray
commitLength:
show: true
mouseEvents: true
skipUnstageLineWarning: false
skipStashWarning: true
showFileTree: false # for rendering changes files in a tree format
showListFooter: false # for seeing the '5 of 20' message in list panels
showRandomTip: true
showCommandLo: true
commandLogSize: 8
authorColors: # in case you're not happy with the randomly assigned colour
'joshmedeski': '#ff0000'
git:
paging:
colorArg: always
useConfig: true
pager: delta --dark --paging=never --24-bit-color=never line-numbers
merging:
# only applicable to unix users
manualCommit: false
# extra args passed to `git merge`, e.g. --no-ff
args: ''
skipHookPrefix: WIP
autoFetch: true
branchLogCmd: 'git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --'
allBranchesLogCmd: 'git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium'
overrideGpg: false # prevents lazygit from spawning a separate process when using GPG
disableForcePushing: false
parseEmoji: false
os:
editCommand: '' # see 'Configuring File Editing' section
editCommandTemplate: '{{editor}} {{filename}}'
openCommand: ''
refresher:
refreshInterval: 10 # file/submodule refresh interval in seconds
fetchInterval: 60 # re-fetch interval in seconds
update:
method: prompt # can be: prompt | background | never
days: 14 # how often an update is checked for
reporting: 'on' # one of: 'on' | 'off' | 'undetermined'
confirmOnQuit: false
# determines whether hitting 'esc' will quit the application when there is nothing to cancel/close
quitOnTopLevelReturn: true
disableStartupPopups: false
notARepository: 'prompt' # one of: 'prompt' | 'create' | 'skip'
promptToReturnFromSubprocess: false # display confirmation when subprocess terminates
customCommands:
- key: "Z"
command: "cz commit"
context: "files"
loadingText: "opening commitizen commit tool"
subprocess: true
keybinding:
universal:
quit: 'q'
quit-alt1: '' # alternative/alias of quit
return: '' # return to previous menu, will quit if there's nowhere to return
quitWithoutChangingDirectory: 'Q'
togglePanel: '' # goto the next panel
prevItem: '' # go one line up
nextItem: '' # go one line down
prevItem-alt: 'k' # go one line up
nextItem-alt: 'j' # go one line down
prevPage: ',' # go to next page in list
nextPage: '.' # go to previous page in list
gotoTop: '<' # go to top of list
gotoBottom: '>' # go to bottom of list
prevBlock: '' # goto the previous block / panel
nextBlock: '' # goto the next block / panel
prevBlock-alt: 'h' # goto the previous block / panel
nextBlock-alt: 'l' # goto the next block / panel
jumpToBlock: ["1", "2", "3", "4", "5"] # goto the Nth block / panel
nextMatch: 'n'
prevMatch: 'N'
optionMenu: 'x' # show help menu
optionMenu-alt1: '?' # show help menu
select: ''
goInto: ''
openRecentRepos: ''
confirm: ''
confirm-alt1: 'y'
remove: 'd'
new: 'n'
edit: 'e'
openFile: 'o'
scrollUpMain: '' # main panel scroll up
scrollDownMain: '' # main panel scroll down
scrollUpMain-alt1: 'K' # main panel scroll up
scrollDownMain-alt1: 'J' # main panel scroll down
scrollUpMain-alt2: '' # main panel scroll up
scrollDownMain-alt2: '' # main panel scroll down
executeCustomCommand: ':'
createRebaseOptionsMenu: 'm'
pushFiles: 'P'
pullFiles: 'p'
refresh: 'R'
createPatchOptionsMenu: ''
nextTab: ']'
prevTab: '['
nextScreenMode: '+'
prevScreenMode: '_'
undo: 'z'
redo: ''
filteringMenu: ''
diffingMenu: 'W'
diffingMenu-alt: '' # deprecated
copyToClipboard: ''
submitEditorText: ''
appendNewline: ''
extrasMenu: '@'
toggleWhitespaceInDiffView: ''
status:
checkForUpdate: 'u'
recentRepos: ''
files:
commitChanges: 'c'
commitChangesWithoutHook: 'w' # commit changes without pre-commit hook
amendLastCommit: 'A'
commitChangesWithEditor: 'C'
ignoreFile: 'i'
refreshFiles: 'r'
stashAllChanges: 's'
viewStashOptions: 'S'
toggleStagedAll: 'a' # stage/unstage all
viewResetOptions: 'D'
fetch: 'f'
toggleTreeView: '`'
branches:
createPullRequest: 'o'
viewPullRequestOptions: 'O'
checkoutBranchByName: 'c'
forceCheckoutBranch: 'F'
rebaseBranch: 'r'
mergeIntoCurrentBranch: 'M'
viewGitFlowOptions: 'i'
fastForward: 'f' # fast-forward this branch from its upstream
pushTag: 'P'
setUpstream: 'u' # set as upstream of checked-out branch
fetchRemote: 'f'
commits:
squashDown: 's'
renameCommit: 'r'
renameCommitWithEditor: 'R'
viewResetOptions: 'g'
markCommitAsFixup: 'f'
createFixupCommit: 'F' # create fixup commit for this commit
squashAboveCommits: 'S'
moveDownCommit: '' # move commit down one
moveUpCommit: '' # move commit up one
amendToCommit: 'A'
pickCommit: 'p' # pick commit (when mid-rebase)
revertCommit: 't'
cherryPickCopy: 'c'
cherryPickCopyRange: 'C'
pasteCommits: 'v'
tagCommit: 'T'
checkoutCommit: ''
resetCherryPick: ''
copyCommitMessageToClipboard: ''
stash:
popStash: 'g'
commitFiles:
checkoutCommitFile: 'c'
main:
toggleDragSelect: 'v'
toggleDragSelect-alt: 'V'
toggleSelectHunk: 'a'
pickBothHunks: 'b'
submodules:
init: 'i'
update: 'u'
bulkMenu: 'b'
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.