summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPiotr Pawel Stefaniak <pstef@FreeBSD.org>2020-07-27 18:46:20 +0000
committerPiotr Pawel Stefaniak <pstef@FreeBSD.org>2020-07-27 18:46:20 +0000
commit9b2a97806ffff94c9568be2f1ecebdf1f61bd50b (patch)
treea345edd07cae12313fcbd6a97edccd7bc715a13f /bin
parentbdfea496cf9f32b9fcfa8be83ee37931138e6ea1 (diff)
downloadsrc-test-9b2a97806ffff94c9568be2f1ecebdf1f61bd50b.tar.gz
src-test-9b2a97806ffff94c9568be2f1ecebdf1f61bd50b.zip
sh(1): print a newline when ^D quits sh
I've always found this a little bit confusing: > sh $ ^D> sh $ ^D> Reviewed by: 0mp, jilles MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25813
Notes
Notes: svn path=/head/; revision=363621
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/sh/main.c b/bin/sh/main.c
index 4d0aae96215fc..8df24dba312e1 100644
--- a/bin/sh/main.c
+++ b/bin/sh/main.c
@@ -228,6 +228,10 @@ cmdloop(int top)
}
}
popstackmark(&smark);
+ if (top && iflag) {
+ out2c('\n');
+ flushout(out2);
+ }
}