void-packages/srcpkgs/dash/patches/0001-SHELL-print-n-upon-EOF-CTRL-D-when-run-interactively.diff

39 lines
894 B
Diff
Raw Normal View History

From a27b4523bd003b37e9a5a2b5a1b3cedee4f701c7 Mon Sep 17 00:00:00 2001
From: Gerrit Pape <pape@smarden.org>
Date: Wed, 11 Feb 2009 01:38:49 +0000
Subject: [SHELL] print \n upon EOF (CTRL-D) when run interactively
Suggested by jidanni through
http://bugs.debian.org/476422
Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
src/main.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/main.c b/src/main.c
index af987c6c..65e236be 100644
--- src/main.c
+++ src/main.c
@@ -227,8 +227,15 @@ cmdloop(int top)
if (!top || numeof >= 50)
break;
if (!stoppedjobs()) {
- if (!Iflag)
+ if (!Iflag) {
+ if (iflag) {
+ out2c('\n');
+#ifdef FLUSHERR
+ flushout(out2);
+#endif
+ }
break;
+ }
out2str("\nUse \"exit\" to leave shell.\n");
}
numeof++;
--
1.7.6