Fix GH #227: Force bd edit to always use direct mode

- bd edit now bypasses daemon to prevent broken pipe errors
- Editing in /usr/local/bin/emacsclient can take minutes, causing daemon timeout
- Added check in PersistentPreRun to set noDaemon=true for edit command
- Human-only interactive command doesn't benefit from daemon anyway

Fixes #227
This commit is contained in:
Steve Yegge
2025-11-05 14:36:52 -08:00
parent e805019dc4
commit d4c73c3469

View File

@@ -141,6 +141,12 @@ var rootCmd = &cobra.Command{
noAutoImport = true
}
// Force direct mode for human-only interactive commands
// edit: can take minutes in $EDITOR, daemon connection times out (GH #227)
if cmd.Name() == "edit" {
noDaemon = true
}
// Set auto-flush based on flag (invert no-auto-flush)
autoFlushEnabled = !noAutoFlush