Module Name: src
Committed By: martin
Date: Tue Dec 17 12:30:36 UTC 2019
Modified Files:
src/usr.bin/mail [netbsd-9]: complete.c mail.1 mime_child.c
Log Message:
Pull up following revision(s) (requested by christos in ticket #555):
usr.bin/mail/mime_child.c: revision 1.10
usr.bin/mail/mail.1: revision 1.68
usr.bin/mail/complete.c: revision 1.21
PR/54766: elo: Broken mime-hooks handling in mail(1)
pullup-9.
PR/54765: elo: Minor error in the mail(1) man page (-F description truncated)
pullup-9
PR/54764: elo: Incorrect '+file' filename completion in mail(1)
Add propel completion stem so that file completion works.
pullup-9
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.48.1 src/usr.bin/mail/complete.c
cvs rdiff -u -r1.65.2.1 -r1.65.2.2 src/usr.bin/mail/mail.1
cvs rdiff -u -r1.9 -r1.9.6.1 src/usr.bin/mail/mime_child.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/mail/complete.c
diff -u src/usr.bin/mail/complete.c:1.20 src/usr.bin/mail/complete.c:1.20.48.1
--- src/usr.bin/mail/complete.c:1.20 Tue Jan 12 14:44:24 2010
+++ src/usr.bin/mail/complete.c Tue Dec 17 12:30:36 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: complete.c,v 1.20 2010/01/12 14:44:24 christos Exp $ */
+/* $NetBSD: complete.c,v 1.20.48.1 2019/12/17 12:30:36 martin Exp $ */
/*-
* Copyright (c) 1997-2000,2005,2006 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: complete.c,v 1.20 2010/01/12 14:44:24 christos Exp $");
+__RCSID("$NetBSD: complete.c,v 1.20.48.1 2019/12/17 12:30:36 martin Exp $");
#endif /* not lint */
/*
@@ -332,16 +332,27 @@ complete_filename(EditLine *el, char *wo
{
StringList *words;
char dir[MAXPATHLEN];
- char *fname;
+ char *fname, *mf;
DIR *dd;
struct dirent *dp;
unsigned char rv;
size_t len;
if ((fname = strrchr(word, '/')) == NULL) {
- dir[0] = '.';
- dir[1] = '\0';
- fname = word;
+ if (word[0] == '+' && (mf = value(ENAME_FOLDER)) != NULL) {
+ if (mf[0] == '/') {
+ (void)estrlcpy(dir, mf, sizeof(dir));
+ } else {
+ dir[0] = '~';
+ dir[1] = '/';
+ (void)estrlcpy(dir + 2, mf, sizeof(dir) - 2);
+ }
+ fname = word + 1;
+ } else {
+ dir[0] = '.';
+ dir[1] = '\0';
+ fname = word;
+ }
} else {
if (fname == word) {
dir[0] = '/';
Index: src/usr.bin/mail/mail.1
diff -u src/usr.bin/mail/mail.1:1.65.2.1 src/usr.bin/mail/mail.1:1.65.2.2
--- src/usr.bin/mail/mail.1:1.65.2.1 Thu Sep 5 08:19:41 2019
+++ src/usr.bin/mail/mail.1 Tue Dec 17 12:30:36 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: mail.1,v 1.65.2.1 2019/09/05 08:19:41 martin Exp $
+.\" $NetBSD: mail.1,v 1.65.2.2 2019/12/17 12:30:36 martin Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)mail.1 8.8 (Berkeley) 4/28/95
.\"
-.Dd September 1, 2019
+.Dd December 14, 2019
.Dt MAIL 1
.Os
.Sh NAME
@@ -1328,7 +1328,7 @@ Message headers currently being ignored
or
.Ic retain
command) are not included.
-.It Ic \&~
+.It Ic \&~F Ns Ar messages
Identical to
.Ic \&~f ,
except all message headers are included.
Index: src/usr.bin/mail/mime_child.c
diff -u src/usr.bin/mail/mime_child.c:1.9 src/usr.bin/mail/mime_child.c:1.9.6.1
--- src/usr.bin/mail/mime_child.c:1.9 Thu Nov 9 20:27:50 2017
+++ src/usr.bin/mail/mime_child.c Tue Dec 17 12:30:36 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: mime_child.c,v 1.9 2017/11/09 20:27:50 christos Exp $ */
+/* $NetBSD: mime_child.c,v 1.9.6.1 2019/12/17 12:30:36 martin Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
#ifndef __lint__
-__RCSID("$NetBSD: mime_child.c,v 1.9 2017/11/09 20:27:50 christos Exp $");
+__RCSID("$NetBSD: mime_child.c,v 1.9.6.1 2019/12/17 12:30:36 martin Exp $");
#endif /* not __lint__ */
#include <assert.h>
@@ -159,7 +159,7 @@ mime_run_command(const char *cmd, FILE *
default: /* parent */
(void)close(p[READ]);
- nfo = fdopen(p[WRITE], "wef");
+ nfo = fdopen(p[WRITE], "we");
if (nfo == NULL) {
warn("mime_run_command: fdopen");
(void)close(p[WRITE]);
@@ -203,7 +203,7 @@ mime_run_function(void (*fn)(FILE *, FIL
default: /* parent */
(void)close(p[READ]);
- nfo = fdopen(p[WRITE], "wef");
+ nfo = fdopen(p[WRITE], "we");
if (nfo == NULL) {
warn("run_function: fdopen");
(void)close(p[WRITE]);