Fix tcsh-6.14.00-dont-print-history-on-verbose.patch

- Add if statement to fix error message on exit
  "verbose: Undefined variable."
This commit is contained in:
Vojtech Vitek (V-Teq) 2011-01-26 15:35:49 +01:00
parent 88add5fe66
commit ec3ef3e950

View File

@ -4,16 +4,23 @@ Date: Wed May 5 17:55:17 2010 -0500
Don't print the history if in verbose mode
Author: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
Date: Wed Jan 26 15:28:17 2011 +0100
- Add if statement to fix error message on exit
"verbose: Undefined variable."
diff --git a/sh.c b/sh.c
index 178b972..0caa51b 100644
--- a/sh.c
+++ b/sh.c
@@ -1378,6 +1378,8 @@ main(argc, argv)
@@ -1378,6 +1378,9 @@ main(argc, argv)
xprintf("exit\n");
}
}
+ /* Don't print the history file to the terminal */
+ unsetv(STRverbose);
+ if (adrof1(STRverbose, &shvhed) != 0)
+ unsetv(STRverbose);
record();
exitstat();
return (0);