bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set -o notify spurious CR when jobs redirected to file


From: Ian! D. Allen
Subject: Re: set -o notify spurious CR when jobs redirected to file
Date: Fri, 14 Nov 2014 14:15:58 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Nov 14, 2014 at 10:30:12AM -0500, Chet Ramey wrote:
> Yes, it's intended.  Piotr identified the code that does this.  If the
> shell is currently interactive, it can't be sure under what circumstances
> it's printing a job notification.

If the shell is printing the job notification because a user has typed
"jobs" at the command line, there is no uncertainty on the part of the
user that the resulting output does not need the extra CR.

Perhaps the shell code isn't written to recognize that the request comes
from a "jobs" command, but there is no uncertainty from the perspective of
the user typing "jobs".  Output generated directly as a result of typing
"jobs" does not need the extra CR.

Now, I can imagine implementations of "jobs" that might make it hard
to communicate this case to the job notify code, but that would be
a shortcoming in the recognition of the circumstances, not a lack of
clarity in what the circumstances are.

In short, it's still a bug.

One might mitigate the bug by refusing to add the CR if output is not
a TTY.  That would refrain from creating what look like DOS-format files.

-- 
| Ian! D. Allen  -  address@hidden  -  Ottawa, Ontario, Canada
| Home Page: http://idallen.com/   Contact Improv: http://contactimprov.ca/
| College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/
| Defend digital freedom:  http://eff.org/  and have fun:  http://fools.ca/



reply via email to

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