Only do certain actions when we are trully interactive, not just when we

are connected to a tty:
	1. enable editor
	2. print directory on directory change.
	3. print job messages
This commit is contained in:
christos 2005-07-15 17:49:43 +00:00
parent b0d51313b4
commit 0df4f0ca31
3 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd.c,v 1.34 2003/11/14 20:00:28 dsl Exp $ */
/* $NetBSD: cd.c,v 1.35 2005/07/15 17:49:43 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)cd.c 8.2 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: cd.c,v 1.34 2003/11/14 20:00:28 dsl Exp $");
__RCSID("$NetBSD: cd.c,v 1.35 2005/07/15 17:49:43 christos Exp $");
#endif
#endif /* not lint */
@ -199,7 +199,7 @@ docd(char *dest, int print)
}
updatepwd(badstat ? NULL : dest);
INTON;
if (print && iflag && curdir)
if (print && iflag == 1 && curdir)
out1fmt("%s\n", curdir);
return 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: histedit.c,v 1.36 2005/05/09 11:35:19 christos Exp $ */
/* $NetBSD: histedit.c,v 1.37 2005/07/15 17:49:43 christos Exp $ */
/*-
* Copyright (c) 1993
@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)histedit.c 8.2 (Berkeley) 5/4/95";
#else
__RCSID("$NetBSD: histedit.c,v 1.36 2005/05/09 11:35:19 christos Exp $");
__RCSID("$NetBSD: histedit.c,v 1.37 2005/07/15 17:49:43 christos Exp $");
#endif
#endif /* not lint */
@ -88,7 +88,7 @@ histedit(void)
#define editing (Eflag || Vflag)
if (iflag) {
if (iflag == 1) {
if (!hist) {
/*
* turn history on

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.48 2003/09/14 12:09:29 jmmv Exp $ */
/* $NetBSD: main.c,v 1.49 2005/07/15 17:49:43 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
#if 0
static char sccsid[] = "@(#)main.c 8.7 (Berkeley) 7/19/95";
#else
__RCSID("$NetBSD: main.c,v 1.48 2003/09/14 12:09:29 jmmv Exp $");
__RCSID("$NetBSD: main.c,v 1.49 2005/07/15 17:49:43 christos Exp $");
#endif
#endif /* not lint */
@ -242,7 +242,7 @@ cmdloop(int top)
if (pendingsigs)
dotrap();
inter = 0;
if (iflag && top) {
if (iflag == 1 && top) {
inter = 1;
showjobs(out2, SHOW_CHANGED);
chkmail(0);