[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] 2 little issues
From: |
Ralph Corderoy |
Subject: |
Re: [Nmh-workers] 2 little issues |
Date: |
Thu, 22 May 2014 00:48:45 +0100 |
Hi Ken,
Earl wrote:
> > I am unclear as to the right solution. Obviously adjusting the MIME
> > parsing routines is wrong. Making sure that the last character of
> > text/plain parts on output contains a newline might be better, but
> > I'm not sure that's technically right either.
One could take the view that those receiving non-Unix text files from
ITS users know where to shove them. :-)
> Pagers like 'less' do this. If the file being viewed does not end in
> a LF, 'less' will add a break so the 'less' status line is still
> rendered at the bottom of the terminal window on its own line.
...
> Since adding a LF would only be done whe rendering the content, and it
> is not modifying the original data, I see no problem.
I think I'd prefer to see that this part's last line is missing a line
terminator. That might be by the status line indicating it, as Earl
said vim does, or just by the status line not starting in column one.
A sample of how other commands handle it...
$ ls
1 2 3
$
$ cat *; echo
foobarxyzzy
$
$ more *
::::::::::::::
1
::::::::::::::
foo
::::::::::::::
2
::::::::::::::
bar
::::::::::::::
3
::::::::::::::
xyzzy
$
$ more * | cat
::::::::::::::
1
::::::::::::::
foo::::::::::::::
2
::::::::::::::
bar::::::::::::::
3
::::::::::::::
xyzzy$
$
$ less * | cat
foobarxyzzy$
$
$ head *
==> 1 <==
foo
==> 2 <==
bar
==> 3 <==
xyzzy$
$
$ grep ^ *
1:foo
2:bar
3:xyzzy
$
$ sed -n l *
foo$
bar$
xyzzy$
$
So head(1) doesn't add a LF after ./3 because it's not about to display
another header.
Cheers, Ralph.
- Re: [Nmh-workers] 2 little issues, (continued)
- Re: [Nmh-workers] 2 little issues, Paul Fox, 2014/05/07
- Re: [Nmh-workers] 2 little issues, Ken Hornstein, 2014/05/13
- Re: [Nmh-workers] 2 little issues, Earl Hood, 2014/05/13
- Re: [Nmh-workers] 2 little issues, Paul Fox, 2014/05/14
- Re: [Nmh-workers] 2 little issues, Earl Hood, 2014/05/14
- Re: [Nmh-workers] 2 little issues, Ken Hornstein, 2014/05/14
- Re: [Nmh-workers] 2 little issues, Paul Fox, 2014/05/14
- Re: [Nmh-workers] 2 little issues, Ken Hornstein, 2014/05/14
- Re: [Nmh-workers] 2 little issues, Earl Hood, 2014/05/14
- Re: [Nmh-workers] 2 little issues, Paul Fox, 2014/05/14
- Re: [Nmh-workers] 2 little issues,
Ralph Corderoy <=