summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-04-01 21:19:06 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-04-01 21:19:06 +0000
commit1e9becb7053969ec46b51de9adb7c903b518fd47 (patch)
treeb3499cc968e7b47dd8b9d5859c61291f3e37eaa1
parentb0711f58b72faf4872589208c6df60c27cac06ca (diff)
Disable editing when in batch mode. Idea from Theo.
This makes ``ftp ftp://some.place.com/some/file &'' work.
-rw-r--r--usr.bin/ftp/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c
index 9ba6afcb3b2..6183c74a94a 100644
--- a/usr.bin/ftp/main.c
+++ b/usr.bin/ftp/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.25 1997/03/21 20:59:30 millert Exp $ */
+/* $OpenBSD: main.c,v 1.26 1997/04/01 21:19:05 millert Exp $ */
/* $NetBSD: main.c,v 1.20 1997/03/16 14:24:21 lukem Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.25 1997/03/21 20:59:30 millert Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.26 1997/04/01 21:19:05 millert Exp $";
#endif
#endif /* not lint */
@@ -199,6 +199,8 @@ main(argc, argv)
}
#ifndef SMALL
+ if (argc > 0) /* batch mode */
+ editing = 0;
if (editing) {
el = el_init(__progname, stdin, stdout); /* init editline */