Re: Quoting: is "${foo-'a"b'"}" valid?

2016-09-09 Thread Chet Ramey
eption of the characters double-quote, backquote, , and . If any unescaped double-quote characters occur within the string, other than in embedded command substitutions, the behavior is unspecified." -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

Re: Quoting: is "${foo-'a"b'"}" valid?

2016-09-10 Thread Chet Ramey
rt Stop here. There is no "single quote stream part" in Posix. The expansion occurs within double quotes, so single quotes are not special. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU

Re: [1003.1(2008)/Issue 7 0000375]: Extend test/[...] conditionals: ==, <, >, -nt, -ot, -ef

2016-09-23 Thread Chet Ramey
e actual standard, so you're defining portable behavior outside the text. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: Quoting: is "${foo-'a"b'"}" valid?

2016-09-17 Thread Chet Ramey
On 9/17/16 7:38 AM, Joerg Schilling wrote: > Chet Ramey <chet.ra...@case.edu> wrote: > >>> But please explain (character by character) why you create an output that >>> is in >>> conflict with the reference implementation (a patched ksh88).

Re: when does PATH search stop?

2016-11-22 Thread Chet Ramey
a file named 'ls' in, say, $HOME/bin, adding $HOME/bin to the beginning of $PATH, and running `bash -c 'ls''. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: Should "exec" run a shell function?

2017-07-17 Thread Chet Ramey
in/true utility rather than the shell builtin? I would say that's a reasonable expectation. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: Should "exec" run a shell function?

2017-07-17 Thread Chet Ramey
On 7/17/17 11:17 AM, Geoff Clare wrote: > Chet Ramey <chet.ra...@case.edu> wrote, on 17 Jul 2017: >> >> On 7/16/17 2:47 PM, Martijn Dekker wrote: >> >>> On the one hand, exec "shall replace the shell with /command/ without >>> creating a new proces

Re: Should "exec" run a shell function?

2017-07-17 Thread Chet Ramey
that the shell run the last element of a pipeline in the current shell context, so `exec' can replace it. Bash runs the last element of the pipeline in a subshell. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: sh exit status ($?) for exec failures

2017-07-02 Thread Chet Ramey
exit status. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: SIGCHLD trap in a shell

2017-04-25 Thread Chet Ramey
he signal is pending. SIGCHLD isn't different from any other signal in this regard. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: SIGCHLD trap in a shell

2017-04-26 Thread Chet Ramey
scripts can't or shouldn't use it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: SIGCHLD trap in a shell

2017-04-27 Thread Chet Ramey
On 4/26/17 7:57 PM, Vincent Lefevre wrote: > On 2017-04-25 21:32:56 -0400, Chet Ramey wrote: >> There is no requirement that a trap be executed each time a particular >> signal is generated. There is no requirement that the system keep a >> count of instances of a particular

Re: SIGCHLD trap in a shell

2017-05-11 Thread Chet Ramey
rsion AIJM 93v- 2013-10-08 $ ksh93 -c 'set -m; while true; do date; /bin/sleep 10; done ; echo after loop' Thu May 11 10:25:55 EDT 2017 ^C $ -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: SIGCHLD trap in a shell

2017-05-11 Thread Chet Ramey
d to give the process groups it creates access to the terminal. Most shells do that. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: SIGCHLD trap in a shell

2017-05-10 Thread Chet Ramey
a single SIGCHLD and running a single instance of the SIGCHLD trap as a result. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: SIGCHLD trap in a shell

2017-05-10 Thread Chet Ramey
On 5/10/17 8:07 AM, Vincent Lefevre wrote: > On 2017-04-27 08:50:23 -0400, Chet Ramey wrote: >> On 4/26/17 8:07 PM, Vincent Lefevre wrote: >>> It should kill itself with SIGINT to mimic what happens in an >>> interactive shell. For instance, I expect >>> >&g

Re: sh(1): is roundtripping of the positional parameter stack possible? (Was: Re: Shell parameter expansions involving '#")

2017-05-16 Thread Chet Ramey
LC_CTYPE category in the current locale. In the POSIX locale, a character is either a or a . -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: [1003.1(2008)/Issue 7 0000767]: Add built-in "local"

2017-05-23 Thread Chet Ramey
ally implemented as something like local var; var="$var". -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: What shell implementations to consider (Was: [1003.1(2008)/Issue 7 0000767]: Add built-in "local")

2017-05-24 Thread Chet Ramey
engroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_12 -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: compound-list

2017-06-15 Thread Chet Ramey
er, and does not attempt to reflect that requirement directly." Though it's mentioned as part of rule 1, it applies more broadly. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.edu

Re: FYI: ksh88 (/usr/xpg4/bin/sh) is not actually POSIX compliant

2017-10-04 Thread Chet Ramey
On 10/4/17 8:52 AM, Joerg Schilling wrote: > Chet Ramey <chet.ra...@case.edu> wrote: > >>> But this is what you get with ksh93: >>> >>> ksh93 -c 'a=0; a() { local a; a=12; } ; a; echo $a' >>> ksh93[1]: local: not found [No such file or directo

Re: FYI: ksh88 (/usr/xpg4/bin/sh) is not actually POSIX compliant

2017-10-04 Thread Chet Ramey
12; } ; a; echo $a' > ksh93[1]: local: not found [No such file or directory] > 12 It doesn't work even if you use `typeset', which is accepted. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: FYI: ksh88 (/usr/xpg4/bin/sh) is not actually POSIX compliant

2017-10-05 Thread Chet Ramey
in its original incarnation as a form interpreter. Korn mentions functions as one of the first things he added to the Bourne shell. I don't know whether ksh-83 had the SVR2 function declaration syntax in addition to `function name', but ksh-86 certainly did. -- ``The lyf so short, the craft so

Re: FYI: ksh88 (/usr/xpg4/bin/sh) is not actually POSIX compliant

2017-10-05 Thread Chet Ramey
On 10/5/17 8:38 AM, Schwarz, Konrad wrote: >> -Original Message- >> From: Chet Ramey [mailto:chet.ra...@case.edu] >> On 10/4/17 8:32 AM, Joerg Schilling wrote: >> >>>> The portion about "local variables" in the quoted text means that the >&

Re: FYI: ksh88 (/usr/xpg4/bin/sh) is not actually POSIX compliant

2017-10-01 Thread Chet Ramey
, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: FYI: ksh88 (/usr/xpg4/bin/sh) is not actually POSIX compliant

2017-10-01 Thread Chet Ramey
``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: FYI: ksh88 (/usr/xpg4/bin/sh) is not actually POSIX compliant

2017-10-01 Thread Chet Ramey
On 9/30/17 8:58 AM, Joerg Schilling wrote: > Chet Ramey <chet.ra...@case.edu> wrote: > >> This is from the ksh93 release documentation: >> >> 1. Functions, defined with name() with ksh-93 are compatible with >> the POSIX standard,

Re: FYI: ksh88 (/usr/xpg4/bin/sh) is not actually POSIX compliant

2017-10-01 Thread Chet Ramey
hell functions are not run in a subshell environment. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: FYI: ksh88 (/usr/xpg4/bin/sh) is not actually POSIX compliant

2017-10-01 Thread Chet Ramey
, between this text and the text in the description of function definitions, it's clearly implied. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: FYI: ksh88 (/usr/xpg4/bin/sh) is not actually POSIX compliant

2017-09-29 Thread Chet Ramey
On 9/29/17 11:29 AM, Stephane Chazelas wrote: > 2017-09-29 10:32:33 -0400, Chet Ramey: >> On 9/29/17 5:59 AM, Martijn Dekker wrote: >>> I've been in correspondence with a few people who still seem to believe >>> that AT ksh88 is POSIX compliant because POSIX was or

Re: FYI: ksh88 (/usr/xpg4/bin/sh) is not actually POSIX compliant

2017-09-29 Thread Chet Ramey
`test' builtin isn't conformant with the Posix number-of- arguments algorithm, but I don't have a version handy to test). -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: FYI: ksh88 (/usr/xpg4/bin/sh) is not actually POSIX compliant

2017-10-06 Thread Chet Ramey
On 10/6/17 8:08 AM, Joerg Schilling wrote: > Chet Ramey <chet.ra...@case.edu> wrote: > >> ksh had functions dating from the early 1980s in its original incarnation >> as a form interpreter. Korn mentions functions as one of the first things >> he added to the Bour

Re: UTF-8 locale & POSIX text model

2017-11-27 Thread Chet Ramey
- Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: UTF-8 locale & POSIX text model

2017-11-27 Thread Chet Ramey
> xterm does not. Yes. If you want xterm to start a login shell, modify the handler you use to start it (e.g., from the XQuartz application menu) to include the `-ls' argument. That's what I meant by my comment. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

Re: Preserving standard input for background commands in scripts

2017-10-30 Thread Chet Ramey
On 10/29/17 7:56 PM, Robert Elz wrote: > | | In all cases, explicit redirection of standard input shall > | | override this activity. > > That last sentence just shouldn't be there - it already says that > the implicit redirect to /dev/null happens before explicit redirects, > which is all

Re: [1003.1(2016)/Issue7+TC2 0001193]: Brace expansion and {var}>file redirects in the shell

2018-04-27 Thread Chet Ramey
s a good idea to honor the locale, though. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: can [[:digit:]] match something other than 0123456789?

2018-05-22 Thread Chet Ramey
that collates like aAbBcC...zZ will pick up upper and lower case characters. There is a shell option that allows you to control the behavior. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Pushing/restoring a file descriptor for a compound command

2018-05-02 Thread Chet Ramey
On 5/2/18 5:52 AM, Joerg Schilling wrote: > 2)bash ignores the "new" rules. Bash reserves most of these historical accidents for posix mode. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTe

Re: Laundry list

2018-04-26 Thread Chet Ramey
try to ask the bash > maintainer to add "s" to bash? Maybe you should check. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Pushing/restoring a file descriptor for a compound command

2018-04-30 Thread Chet Ramey
what do you think? There's nothing in Posix that specifies the behavior one way or another, so it's just an incompatibility between shells. I'll take a look. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates C

Re: More questions/comments on XCU 2.13 (sh Pattern Matching)

2018-04-29 Thread Chet Ramey
backslash should be treated as an escape character by the pattern matching engine. This is as the standard specifies. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2013)/Issue7+TC1 0001123]: Problematic specification of execution environment for word expansions

2018-08-16 Thread Chet Ramey
ameters. This eliminated the need for the ${1+"$@"} idiom. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2013)/Issue7+TC1 0001123]: Problematic specification of execution environment for word expansions

2018-08-16 Thread Chet Ramey
perhaps others learned about them differently. The austin-group-l discussion from October, 2014 is illuminating, if you can find it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@c

Re: what variables are affected by the "allexport" shell option?

2018-08-16 Thread Chet Ramey
o long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Status of pipefail for standardization

2018-09-11 Thread Chet Ramey
; they will become non-conforming if enough other shells do implement it. There is prior art here. The group has simply chosen not to standardize `type -t'. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech

Re: Status of pipefail for standardization

2018-09-11 Thread Chet Ramey
On 9/11/18 10:56 AM, Robert Elz wrote: > Date:Tue, 11 Sep 2018 09:44:01 -0400 > From: Chet Ramey > Message-ID: > > | There is prior art here. The group has simply chosen not to standardize > | `type -t'. > > Oh, this is too g

Re: Should shell quoting within glob bracket patterns be effective?

2018-04-10 Thread Chet Ramey
tion, > | arithmetic expansion, and quote removal of the given word. That text is describing the `word', not the patterns kre is talking about. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@c

Re: [1003.1(2016)/Issue7+TC2 0001190]: backslash has two special meanings in the shell and only loses one of them in bracket expressions

2018-04-17 Thread Chet Ramey
s the behavior of the reference implementation... Posix chose to deviate from the historical behavior in a number of cases. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: XRAT C2.3.3 lines 127462-5

2018-04-20 Thread Chet Ramey
umber of unescaped double-quotes or single-quotes, if any, shall occur." -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2016)/Issue7+TC2 0001193]: Brace expansion and {var}>file redirects in the shell

2018-04-25 Thread Chet Ramey
brace expansion by default, and standardize the existing behavior. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2016)/Issue7+TC2 0001193]: Brace expansion and {var}>file redirects in the shell

2018-04-25 Thread Chet Ramey
urrently do? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2016)/Issue7+TC2 0001193]: Brace expansion and {var}>file redirects in the shell

2018-04-25 Thread Chet Ramey
h: foo\: invalid variable name In Bash, quoting either the `{' or `}' or providing a word in the braces that isn't a valid identifier is enough to disable the feature. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippo

Re: [1003.1(2016)/Issue7+TC2 0001193]: Brace expansion and {var}>file redirects in the shell

2018-04-25 Thread Chet Ramey
so before ksh93. I sent the first brace expansion code to Brian in early April, 1989, before bash-1.0 came out (June). Bash has always performed brace expansion before any other word expansions. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita br

Re: Command searching in PATH if command found is not executable

2018-04-26 Thread Chet Ramey
03_154 and the shell should continue to search $PATH. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2016)/Issue7+TC2 0001193]: Brace expansion and {var}>file redirects in the shell

2018-04-26 Thread Chet Ramey
On 4/26/18 4:36 AM, Joerg Schilling wrote: > Chet Ramey <chet.ra...@case.edu> wrote: > >> On 4/25/18 10:46 AM, Joerg Schilling wrote: >> >>> bash also supports "braceexpand" and could set it to "off" by default in >>> case >

Re: Several questions about $'...'

2018-10-02 Thread Chet Ramey
the current token as a C string, then go on with the rest of the input, you get the bash behavior. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Alias implementations being invalidated by proposed new wording?

2019-01-01 Thread Chet Ramey
so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Alias implementations being invalidated by proposed new wording?

2019-01-01 Thread Chet Ramey
On 1/1/19 8:33 PM, Harald van Dijk wrote: > On 02/01/2019 00:21, Chet Ramey wrote: >> On 1/1/19 5:10 PM, Harald van Dijk wrote: >> >>>> Alias expansion happens "before applying the grammatical rules", so >>>> there's >>>> no lookahea

Re: Alias implementations being invalidated by proposed new wording?

2019-01-01 Thread Chet Ramey
o long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Alias implementations being invalidated by proposed new wording?

2019-01-02 Thread Chet Ramey
er (or what is considered the > lexer from the parser's perspective, at any rate). The rules in 2.10.2 are the ones I mean, since they're the ones that determine what a TOKEN becomes. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: In defence of compound aliases

2019-01-15 Thread Chet Ramey
? AFAICT, that's one of the things everyone does the same way. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: In defence of compound aliases

2019-01-15 Thread Chet Ramey
On 1/15/19 10:14 AM, Joerg Schilling wrote: > Chet Ramey wrote: > >> Or are we hung up on the word "stack"? > > You seem to missunderstand me. Sure, OK. Frame it how you like. The question stands. If that is how every existing alias implementation behaves, we s

Re: In defence of compound aliases

2019-01-15 Thread Chet Ramey
On 1/15/19 9:56 AM, Joerg Schilling wrote: > Chet Ramey wrote: > >> Which shells don't rescan the alias value in the lexer? AFAICT, that's one >> of the things everyone does the same way. > > A shell that did this would only be able to alias one word by one othe

Re: In defence of compound aliases

2019-01-15 Thread Chet Ramey
o (from the austin-group list, I think) and fixed, and the fix is in bash-5.0. Let's not count that one as a difference. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Minutes of the 6th December 2018 Teleconference

2018-12-10 Thread Chet Ramey
is is correct. > x 0 > > for > bash -c 'a=`false; echo 1` :; echo x $a $?' > > what does not seem to match our wishes. Try posix mode. Bash doesn't implement the idiotic historical behavior of variable assignments preceding special builtins in its default mode. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Alias implementations being invalidated by proposed new wording?

2019-01-08 Thread Chet Ramey
utput `three'. Since the standard has never specified that the ending be unquoted, it's not surprising that implementations vary. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2013)/Issue7+TC1 0000953]: Alias expansion is under-specified

2019-01-10 Thread Chet Ramey
those cases unspecified "breaks many applications." Shells, even posix shells in posix mode, are free to accept any or all of the above, just as they do today. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet R

Re: [1003.1(2013)/Issue7+TC1 0000953]: Alias expansion is under-specified

2019-01-11 Thread Chet Ramey
expanded when not in posix mode. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2013)/Issue7+TC1 0000953]: Alias expansion is under-specified

2019-01-11 Thread Chet Ramey
On 1/11/19 8:15 AM, Stephane Chazelas wrote: > 2019-01-10 19:01:08 -0500, Chet Ramey: >> On 1/10/19 5:29 PM, Stephane Chazelas wrote: >> >>> In any case, by no longer allowing pipelines, redirections, >>> multiple commands, keywords, comments in alias v

Re: Alias implementations being invalidated by proposed new wording?

2019-01-09 Thread Chet Ramey
f's proposed resolution from today does that. The original and revised proposals for bug 953 did not. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Alias implementations being invalidated by proposed new wording?

2019-01-09 Thread Chet Ramey
hink it would reduce confusion if it were explicitly mandated. Regardless, the fact that existing shells do it differently is reason enough to not mandate a particular behavior. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Alias implementations being invalidated by proposed new wording?

2019-01-02 Thread Chet Ramey
On 1/1/19 10:15 PM, Harald van Dijk wrote: > On 02/01/2019 02:34, Chet Ramey wrote: >> On 1/1/19 8:33 PM, Harald van Dijk wrote: >>> Ah! Now I think I see how we are interpreting things differently. Am I >>> understanding correctly that given >>> >&g

Re: Alias implementations being invalidated by proposed new wording?

2019-01-02 Thread Chet Ramey
On 1/2/19 10:34 AM, Geoff Clare wrote: > Chet Ramey wrote, on 02 Jan 2019: >> >> On 1/2/19 8:32 AM, Robert Elz wrote: >> >>> ps: while I am here, can someone point me at the issue number >>> which has the new wording for alias processing in it?

Re: Alias implementations being invalidated by proposed new wording?

2019-01-02 Thread Chet Ramey
, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Alias implementations being invalidated by proposed new wording?

2019-01-02 Thread Chet Ramey
s correct if you substitute TOKEN for WORD. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Alias implementations being invalidated by proposed new wording?

2019-01-02 Thread Chet Ramey
ension. Alias names are defined in http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_10 . -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Alias implementations being invalidated by proposed new wording?

2019-01-02 Thread Chet Ramey
ga, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Status of pipefail for standardization

2018-09-15 Thread Chet Ramey
you get complaints, > you can always change it back, if all your users are happy (ie: > they never even notice) then we will all be happy too! We'll see how it goes. It took a #define and three lines of code. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``

Re: Status of pipefail for standardization

2018-09-11 Thread Chet Ramey
On 9/11/18 12:24 PM, Robert Elz wrote: > Date:Tue, 11 Sep 2018 11:43:07 -0400 > From: Chet Ramey > Message-ID: > > > | Bash and ksh93 (at least the latest version I have from git). > | > | $ ./src/cmd/ksh93/ksh -c 'type

Re: [1003.1(2016)/Issue7+TC2 0001212]: Enhance trap command

2019-04-14 Thread Chet Ramey
On 4/13/19 5:47 PM, Robert Elz wrote: > Date:Sat, 13 Apr 2019 13:52:17 -0400 > From: Chet Ramey > Message-ID: > > | There's no practical difference, really. > > If you mean to the user of the result (consumer of the output of > the tra

Re: [1003.1(2016)/Issue7+TC2 0001212]: Enhance trap command

2019-04-15 Thread Chet Ramey
at case does "not in its default > state" include blocked signals (as in sigprocmask(SIG_BLOCK)) which in their > default state would not be blocked? I don't view blocking signals as changing the state of their disposition. Blocking is a temporary condition; the disposition is what happens when they are unblocked and allowed through. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2016)/Issue7+TC2 0001212]: Enhance trap command

2019-04-15 Thread Chet Ramey
On 4/15/19 11:07 AM, Joerg Schilling wrote: > Chet Ramey wrote: > >> It's not. It's about why there is a distinction between non-interactive and >> interactive shells. My guess is that Korn wanted scripts to be able to >> change traps for signals ignored at s

Re: [1003.1(2016)/Issue7+TC2 0001212]: Enhance trap command

2019-04-15 Thread Chet Ramey
On 4/15/19 10:33 AM, Robert Elz wrote: > Date:Mon, 15 Apr 2019 09:38:26 -0400 > From: Chet Ramey > Message-ID: > > | On 4/15/19 5:32 AM, Geoff Clare wrote: > | > | > The part in parentheses in the bug 1212 resolu

Re: [1003.1(2016)/Issue7+TC2 0001212]: Enhance trap command

2019-04-15 Thread Chet Ramey
rs longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Fwd: Re: [1003.1(2016)/Issue7+TC2 0001212]: Enhance trap command

2019-04-17 Thread Chet Ramey
--- Begin Message --- Date:Wed, 17 Apr 2019 11:51:17 -0400 From:Chet Ramey Message-ID: | But that's not what I'm claiming. I'm observing that the behavior you | cited from the historical Bourne shell, the option you said Geoff forgot, | is not present

Re: [1003.1(2016)/Issue7+TC2 0001212]: Enhance trap command

2019-04-17 Thread Chet Ramey
On 4/17/19 12:45 PM, Robert Elz wrote: > Date:Wed, 17 Apr 2019 11:51:17 -0400 > From: Chet Ramey > Message-ID: > > | But that's not what I'm claiming. I'm observing that the behavior you > | cited from the historical Bourne shell, the option you

Re: [1003.1(2016)/Issue7+TC2 0001212]: Enhance trap command

2019-04-13 Thread Chet Ramey
any discussion. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Bug 1228: allow shells to exclude "." and ".." from pathname expansions

2019-05-31 Thread Chet Ramey
On 5/31/19 8:08 AM, Joerg Schilling wrote: > Chet Ramey wrote: > >> Whether or not I would implement it is secondary. The primary question is >> why the committee would choose this as a feature to invent when there are >> existing features that need standardization an

Re: Bug 1228: allow shells to exclude "." and ".." from pathname expansions

2019-05-31 Thread Chet Ramey
> code might be able to see, but which the user isn't supposed to see. So the old `rm -rf .*'? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: Bug 1228: allow shells to exclude "." and ".." from pathname expansions

2019-05-30 Thread Chet Ramey
ent when there are existing features that need standardization and more pressing problems to solve by inventing features. What makes this important enough? -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey,

Re: behaviour upon non-matching globs

2019-06-02 Thread Chet Ramey
y to have #2 is to do an implementation yourself and then get #1 by showing how it will -- or does -- improve user experience. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: behaviour upon non-matching globs (Was: Arrays)

2019-06-02 Thread Chet Ramey
sider this proposal, given the pervasive use of tools like grep as filters and as components of pipelines. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: behaviour upon non-matching globs (Was: Arrays)

2019-06-02 Thread Chet Ramey
On 6/2/19 11:48 AM, Steven Penny wrote: > On Sun, Jun 2, 2019 at 10:39 AM Chet Ramey wrote: >> You might want to reconsider this proposal, given the pervasive use of >> tools like grep as filters and as components of pipelines. > > Its misleading that you omitted the ne

Re: getopts, OPTIND, and grouped options

2019-06-14 Thread Chet Ramey
On 6/14/19 2:20 PM, Michael Greenberg wrote: > is it morally > acceptable for the shell builtin getopts Let's not get too far out over our skis here. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey,

Re: [1003.1(2013)/Issue7+TC1 0000760]: asynchronous list assignment of stdin should depend on job control

2019-06-10 Thread Chet Ramey
On 6/10/19 3:15 PM, Harald van Dijk wrote: > On 10/06/2019 19:22, Chet Ramey wrote: >> On 6/10/19 2:15 PM, Harald van Dijk wrote: >> >>>> Re: http://austingroupbugs.net/view.php?id=760#c4411 <&0 is a no-op, so >>>> it's >>>> unclear whether

Re: [1003.1(2016)/Issue7+TC2 0001234]: in most shells, backslash doesn't have two meaning wrt pattern matching

2019-06-18 Thread Chet Ramey
time to go through all of this, but all the shells I see treat that as a pattern ending in an unescaped backslash, and produce the same results. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2016)/Issue7+TC2 0001234]: in most shells, backslash doesn't have two meaning wrt pattern matching

2019-06-24 Thread Chet Ramey
On 6/24/19 1:53 PM, Harald van Dijk wrote: > On 24/06/2019 15:16, Chet Ramey wrote: >> On 6/22/19 8:57 AM, Harald van Dijk wrote: >> >>>> But in bash5's >>>> >>>> files='/a/\b/??/x/*' >>>> ls -d $files >>>> >

Re: shell `var=value function`

2019-06-10 Thread Chet Ramey
ault), and the next version of bash will probably make that the default in POSIX mode as well. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

Re: [1003.1(2016)/Issue7+TC2 0001234]: in most shells, backslash doesn't have two meaning wrt pattern matching

2019-06-20 Thread Chet Ramey
f no file name matches, the pattern > should be left strictly unchanged - exactly as if no pathname > matching had been attempted at all. I agree with this. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey,

Re: [1003.1(2016)/Issue7+TC2 0001234]: in most shells, backslash doesn't have two meaning wrt pattern matching

2019-06-21 Thread Chet Ramey
me as a dequoted pattern configure uses. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/

  1   2   3   >