svn commit: r363621 - head/bin/sh

Piotr Pawel Stefaniak pstef at FreeBSD.org
Mon Jul 27 18:46:21 UTC 2020


Author: pstef
Date: Mon Jul 27 18:46:20 2020
New Revision: 363621
URL: https://svnweb.freebsd.org/changeset/base/363621

Log:
  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

Modified:
  head/bin/sh/main.c

Modified: head/bin/sh/main.c
==============================================================================
--- head/bin/sh/main.c	Mon Jul 27 16:51:23 2020	(r363620)
+++ head/bin/sh/main.c	Mon Jul 27 18:46:20 2020	(r363621)
@@ -228,6 +228,10 @@ cmdloop(int top)
 		}
 	}
 	popstackmark(&smark);
+	if (top && iflag) {
+		out2c('\n');
+		flushout(out2);
+	}
 }
 
 


More information about the svn-src-head mailing list