tech-userlevel archive

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

Re: What should we do with the -n flag in sh ?



    Date:        Sat, 12 Mar 2016 11:19:47 +0000
    From:        David Laight <david%l8s.co.uk@localhost>
    Message-ID:  <20160312111947.GA807%snowdrop.l8s.co.uk@localhost>

  | I'm not sure that supporting 'set -n' is a good idea.

Using it doesn't make much sense, but it is part of the standard
and we're supposed to do something with it.   Neither the standard,
nor its writers, seem to have much idea what though... (except that
we are intended to not execute stuff.)

It is also a very old option, it has been there (in real Bourn shells,
as opposed to ash) since forever (or close to it.)

  | Unsetting '-n' when outputting the prompt does sound reasonable.

That's been in the current shell now for a week or so (went in at the
same time as the incompetence from me that caused the "use exit to exit"
when it wasn't supposed to (now fixed) - unrelated changes but in the same
patch.)

Unless someone actually decides what -n should inhibit, and it is different
than what we're doing, I think work on -n is done for now.

kre



Home | Main Index | Thread Index | Old Index