A NOTE has been added to this issue. 
====================================================================== 
http://austingroupbugs.net/view.php?id=1039 
====================================================================== 
Reported By:                kre
Assigned To:                
====================================================================== 
Project:                    1003.1(2013)/Issue7+TC1
Issue ID:                   1039
Category:                   Shell and Utilities
Type:                       Clarification Requested
Severity:                   Editorial
Priority:                   normal
Status:                     Interpretation Required
Name:                       Robert Elz 
Organization:                
User Reference:              
Section:                    2.5.2 
Page Number:                2324 
Line Number:                73759-73761 
Interp Status:              Pending 
Final Accepted Text:        http://austingroupbugs.net/view.php?id=1039#c3617 
====================================================================== 
Date Submitted:             2016-03-26 07:30 UTC
Last Modified:              2018-04-26 16:03 UTC
====================================================================== 
Summary:                    Which option flags should appear in $- ?
====================================================================== 

---------------------------------------------------------------------- 
 (0004012) kre (reporter) - 2018-04-26 16:03
 http://austingroupbugs.net/view.php?id=1039#c4012 
---------------------------------------------------------------------- 
I have no idea why this issue is still under discussion, can we not just
stop?

It doesn't really matter why I used to use -$- (it was in my sh code
all over the place which is why I would have preferred to keep the
idiom, but I think I have removed it all now).

I know that the original sh did not include 'c' in $- - that's why -$-
was able to work (though the one liners that tend to be used with sh -c
would rarely have needed it anyway.)   And I know there was no "set +".
I wasn't really aware of -r (that was just done when the name was rsh,
I don't believe that was ever in $- in the early shell, not that I would
have cared, or noticed, since (that) rsh was never of any interest).

I believe "set +o" is much more recent.

I also don't believe there are any "forbidden" flags, there are some that
cannot be set in some shells -- but can be in others - though not always
with
any effect,.  The 's' flag in the NetBSD shell is essentially a 1 bit
variable - scripts (if they're insane) can use it however they like, it
can be set/reset but that does nothing (except reset the state of the
shell at startup, if it has not been changed).  If the shell is reading
stdin, it is reading stdin, and turning off a flag does not change that
(where
otherwise would it read the next command from?)   Nor does turning it on
cause the shell to suddenly leave its script and start reading stdin.
I suppose it could just be left out of 'set' but then it would need to
be special cased in command line processing (as -c requires) and that
would take extra code (and so introduce more bugs) - easier to just
set it at startup, then leave it and ignore it.

Unless there is really some problem with the accepted text, which I do
not believe there is, can't we just concentrate on issues that need actual
resolution, rather than just making noise? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-03-26 07:30 kre            New Issue                                    
2016-03-26 07:30 kre            Name                      => Robert Elz      
2016-03-26 07:30 kre            Section                   => 2.5.2           
2016-03-26 07:30 kre            Page Number               => unknown         
2016-03-26 07:30 kre            Line Number               => unknown         
2016-03-26 08:12 Don Cragun     Page Number              unknown => 2324     
2016-03-26 08:12 Don Cragun     Line Number              unknown => 73759-73761
2016-03-26 08:12 Don Cragun     Interp Status             => ---             
2017-03-16 16:22 geoffclare     Note Added: 0003617                          
2017-03-16 16:23 geoffclare     Interp Status            --- => Pending      
2017-03-16 16:23 geoffclare     Final Accepted Text       =>
http://austingroupbugs.net/view.php?id=1039#c3617    
2017-03-16 16:23 geoffclare     Status                   New => Interpretation
Required
2017-03-16 16:23 geoffclare     Resolution               Open => Accepted As
Marked
2017-03-16 16:23 geoffclare     Tag Attached: tc3-2008                       
2017-03-16 17:16 kre            Note Added: 0003618                          
2017-03-16 17:31 joerg          Note Added: 0003619                          
2017-03-16 17:38 joerg          Note Edited: 0003619                         
2017-03-16 18:07 kre            Note Added: 0003620                          
2017-03-17 09:09 geoffclare     Note Added: 0003622                          
2017-03-17 10:46 kre            Note Added: 0003624                          
2017-03-17 10:54 joerg          Note Added: 0003625                          
2017-03-17 12:07 kre            Note Added: 0003630                          
2017-03-17 12:51 joerg          Note Added: 0003634                          
2017-03-17 13:05 kre            Note Added: 0003636                          
2018-04-26 11:44 McDutchie      Note Added: 0004002                          
2018-04-26 12:12 joerg          Note Added: 0004003                          
2018-04-26 12:23 joerg          Note Edited: 0004003                         
2018-04-26 12:47 kre            Note Added: 0004004                          
2018-04-26 12:55 kre            Note Added: 0004005                          
2018-04-26 12:59 joerg          Note Edited: 0004003                         
2018-04-26 13:06 joerg          Note Added: 0004006                          
2018-04-26 13:58 McDutchie      Note Added: 0004007                          
2018-04-26 13:59 kre            Note Added: 0004008                          
2018-04-26 14:20 kre            Note Added: 0004009                          
2018-04-26 14:34 joerg          Note Edited: 0004006                         
2018-04-26 14:39 joerg          Note Added: 0004010                          
2018-04-26 14:40 joerg          Note Edited: 0004010                         
2018-04-26 16:03 kre            Note Added: 0004012                          
======================================================================


Reply via email to