about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-09-23 08:41:54 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-09-23 08:41:54 +0000
commitd3c4108f30fd987724ccffd9559ea2f49ac57328 (patch)
treec3b6d260a1af979fffac64ad7a85c3ad5f057aa7 /Src
parentc54e113d2885251fc4269331524532e02c7a7f6e (diff)
downloadzsh-d3c4108f30fd987724ccffd9559ea2f49ac57328.tar.gz
zsh-d3c4108f30fd987724ccffd9559ea2f49ac57328.tar.xz
zsh-d3c4108f30fd987724ccffd9559ea2f49ac57328.zip
Rocky Bernstein: 25727: allow fc non-interactively
Add sanity test for empty history
Diffstat (limited to 'Src')
-rw-r--r--Src/builtin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index 4772e0a8c..d274ef9ad 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -1296,10 +1296,12 @@ bin_fc(char *nam, char **argv, Options ops, int func)
     Patprog pprog = NULL;
 
     /* fc is only permitted in interactive shells */
+#ifdef FACIST_INTERACTIVE
     if (!interact) {
 	zwarnnam(nam, "not interactive shell");
 	return 1;
     }
+#endif
     if (OPT_ISSET(ops,'p')) {
 	char *hf = "";
 	zlong hs = DEFAULT_HISTSIZE;