nmh-workers
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]