Skip to content

Commit f8dc0e3

Browse files
skyfmmfjpgrayson
authored andcommitted
fix: Pass stdio for interactive editing
gix_command by default does not pass stdin to commands. This caused editors and shells to behave weirdly. For example, vim printed a warning during opening: Vim: Warning: Input is not from a terminal After closing vim started this way, the terminal was messed up and needed an reset to print outputs correctly (see stgit#415). Signed-off-by: Felix Maurer <[email protected]>
1 parent 3ff7bc2 commit f8dc0e3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/patch/edit/interactive.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ pub(crate) fn call_editor<P: AsRef<Path>>(
9292
let status_result = gix_command::prepare(&editor)
9393
.arg(path.as_ref())
9494
.with_shell_allow_argument_splitting()
95+
.stdin(std::process::Stdio::inherit())
9596
.stdout(std::process::Stdio::inherit())
9697
.spawn()
9798
.with_context(|| format!("running editor: {}", editor.to_string_lossy()))

0 commit comments

Comments
 (0)