-.\" $OpenBSD: ftp.1,v 1.7 1997/02/03 01:05:38 millert Exp $
+.\" $OpenBSD: ftp.1,v 1.8 1997/02/18 18:04:28 kstailey Exp $
.\" $NetBSD: ftp.1,v 1.17 1997/02/01 10:45:01 lukem Exp $
.\"
.\" Copyright (c) 1985, 1989, 1990, 1993
.Nm
.Op Fl a
.Op Fl d
+.Op Fl e
.Op Fl g
.Op Fl i
.Op Fl n
to bypass normal login procedure, and use an anonymous login instead.
.It Fl d
Enables debugging.
+.It Fl e
+Suppress the use of editline(3). Useful for Emacs ange-ftp.
.It Fl g
Disables file name globbing.
.It Fl i
-/* $OpenBSD: ftp_var.h,v 1.7 1997/02/03 01:05:41 millert Exp $ */
+/* $OpenBSD: ftp_var.h,v 1.8 1997/02/18 18:04:30 kstailey Exp $ */
/* $NetBSD: ftp_var.h,v 1.13 1997/02/01 10:45:05 lukem Exp $ */
/*
int verbose; /* print messages coming back from server */
int connected; /* connected to server */
int fromatty; /* input is from a terminal */
+int use_editline; /* use the editline(3) routine for input */
int interactive; /* interactively prompt on m* cmds */
int confirmrest; /* confirm rest of current m* cmd */
int debug; /* debugging level */
-/* $OpenBSD: main.c,v 1.20 1997/02/05 04:55:19 millert Exp $ */
+/* $OpenBSD: main.c,v 1.21 1997/02/18 18:04:31 kstailey Exp $ */
/* $NetBSD: main.c,v 1.17 1997/02/01 10:45:07 lukem Exp $ */
/*
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.20 1997/02/05 04:55:19 millert Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.21 1997/02/18 18:04:31 kstailey Exp $";
#endif
#endif /* not lint */
progress = 0;
mark = HASHBYTES;
marg_sl = sl_init();
+ use_editline = 1; /* use editline if possible */
cp = strrchr(argv[0], '/');
cp = (cp == NULL) ? argv[0] : cp + 1;
if (fromatty)
verbose = 1; /* verbose if from a tty */
- while ((ch = getopt(argc, argv, "adginpPr:tvV")) != -1) {
+ while ((ch = getopt(argc, argv, "adeginpPr:tvV")) != -1) {
switch (ch) {
case 'a':
anonftp = 1;
debug++;
break;
+ case 'e':
+ use_editline = 0;
+ break;
+
case 'g':
doglob = 0;
break;
#ifndef SMALLFTP
editing = 0; /* command line editing off */
- if (fromatty) {
+ if (fromatty && use_editline) {
editing = 1; /* editing mode on if a tty */
el = el_init(__progname, stdin, stdout); /* init editline */