Re: [Toybox] [PATCH] sh: pass "\" to the later app

2023-07-24 Thread Chet Ramey
econd case, the second word is $LINENO, so the current line number is 1 (2 in current versions, since -c command initializes to 1). Everything else works as before. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, U

Re: [Toybox] [PATCH] sh: pass "\" to the later app

2023-07-11 Thread Chet Ramey
know how prevalent that is. but, again, that's aimed at apps. Yep, bash is definitely a unicorn here. 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.

Re: [Toybox] [PATCH] sh: pass "\" to the later app

2023-07-10 Thread Chet Ramey
On 7/8/23 7:41 AM, Rob Landley wrote: On 7/6/23 20:09, Chet Ramey wrote: ... Distinguishing : from true seems deeply silly true wasn't a special builtin in the Bourne shell. It isn't because it wasn't. Historical reasons, no other pattern or logic. Is there pattern or logic

Re: [Toybox] [PATCH] sh: pass "\" to the later app

2023-07-10 Thread Chet Ramey
On 7/9/23 7:43 PM, Rob Landley wrote: On 6/18/23 16:28, Rob Landley wrote: On 6/12/23 19:40, Chet Ramey wrote: I wish you were not so reluctant. Look at how many things you've discovered that I decided were bugs based on our discussions. But since you asked, today's new question I wrestled

Re: [Toybox] [PATCH] sh: pass "\" to the later app

2023-07-09 Thread Chet Ramey
t a lot of value, but you're right, sometimes you have to break it. That's why bash has its compatibility mode. But it seems like gradually fixing things, or adding a compatibility mode setting, sometimes only gives people the opportunity to complain simultaneously about both the problem and the s

Re: [Toybox] [PATCH] sh: pass "\" to the later app

2023-07-07 Thread Chet Ramey
know you will, it's best to start looking forward to it now. 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: [Toybox] [PATCH] sh: pass "\" to the later app

2023-07-06 Thread Chet Ramey
our distro can't even be bothered to apply all the patches for a single version? Devuan is a thin skin over Debian, when I ask about this sort of thing on the #devuan libra.chat channel they point me at https://packages.debian.org/search?keywords=bash and similar. Debian still has bug reports on th

Re: [Toybox] [PATCH] sh: pass "\" to the later app

2023-07-01 Thread Chet Ramey
On 6/30/23 8:57 PM, Rob Landley wrote: On 6/12/23 19:40, Chet Ramey wrote: I wish you were not so reluctant. Look at how many things you've discovered that I decided were bugs based on our discussions. But since you asked, today's new question I wrestled with was Why does eval "&q

Re: [Toybox] [PATCH] sh: pass "\" to the later app

2023-06-21 Thread Chet Ramey
he EOF (-1) sentinel leaked into the string and came out as an unsigned char (0xff). That's pretty clearly a bug. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.edu

Re: [Toybox] [PATCH] sh: pass "\" to the later app

2023-06-19 Thread Chet Ramey
On 6/17/23 7:23 PM, Rob Landley wrote: On 6/12/23 19:40, Chet Ramey wrote: and they have a list of "special built-in utilities" that does NOT include cd (that's listed in normal utilities: how would one go about implementing that outside of the shell, do you think?) That's not what

Re: [Toybox] [PATCH] sh: pass "\" to the later app

2023-06-12 Thread Chet Ramey
On 6/12/23 5:23 PM, Rob Landley wrote: On 6/9/23 15:23, Chet Ramey wrote: On 6/8/23 10:31 PM, Rob Landley wrote: On 6/5/23 18:08, Chet Ramey wrote: You got me. You're right; I had it backwards. I'm not trying to gotcha anybody, I'm just trying to understand what the right thing to implement

Re: [Toybox] [PATCH] sh: pass "\" to the later app

2023-06-09 Thread Chet Ramey
On 6/8/23 10:31 PM, Rob Landley wrote: On 6/5/23 18:08, Chet Ramey wrote: But escaping a _newline_ is funny in that it glues lines together instead of creating a command line argument out of the result, which means it has to be special cased and obviously I'm special casing it wrong

Re: [Toybox] [PATCH] sh: pass "\" to the later app

2023-06-05 Thread Chet Ramey
On 6/5/23 1:04 AM, Rob Landley wrote: On 6/1/23 10:20, Chet Ramey wrote: On 5/29/23 12:39 PM, Rob Landley wrote: But I'm still left with this divergence: $ ./sh -c 'echo abc\' abc $ bash -c 'echo abc\' abc\ The backslash doesn't escape anything, EOF delimits the token

Re: [Toybox] [PATCH] sh: pass "\" to the later app

2023-06-01 Thread Chet Ramey
f so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

Re: [Toybox] is orthodoxy a strong value of toybox?

2022-09-06 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/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

Re: [Toybox] is orthodoxy a strong value of toybox?

2022-09-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://tiswww.cwru.edu/~chet/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.l

Re: [Toybox] is orthodoxy a strong value of toybox?

2022-09-01 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/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi

Re: [Toybox] Endless bash questions...

2022-07-06 Thread Chet Ramey
with that, then roll forward if you want to. Report things that seem wrong or inconsistent, and see if they change in a future version. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UT

Re: [Toybox] Endless bash questions...

2022-06-06 Thread Chet Ramey
short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/

Re: [Toybox] Endless bash questions...

2022-06-04 Thread Chet Ramey
< potatosalad $ a potatosalad $ a potatosalad $ a() { cat; } <(echo hello) bash: syntax error near unexpected token `<(echo hello)' And here. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CW

Re: [Toybox] And again.

2020-09-02 Thread Chet Ramey
e out of _our_ host /dev?) It's not useful, true, but you can do it. > Other than this, the only other example I can think of is telling the kernel: > > KCONFIG_ALLCONFIG=<(cat file) make allnoconfig The reason to use process substitution is to communicate with asynchronous child process

Re: [Toybox] And again.

2020-09-01 Thread Chet Ramey
rly insane proposal about unicode and locales: https://lists.gnu.org/archive/html/bug-bash/2019-12/msg00013.html Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.c

Re: [Toybox] And again.

2020-09-01 Thread Chet Ramey
hat any arbitrary shell script can appear in $() command substitution, so I got a bunch of bug reports. I ended up having to write special-case code for this, because bison/yacc can't easily handle calling the parser recursively. -- ``The lyf so short, the craft so long to lerne.'' -

Re: [Toybox] bash continues to confuse me.

2020-07-06 Thread Chet Ramey
instance that can be ignored.) The standard doesn't provide it to you at all, and most shells don't have a way to obtain it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduht

Re: [Toybox] bash continues to confuse me.

2020-07-05 Thread Chet Ramey
On 7/1/20 4:50 PM, Chet Ramey wrote: >> But implementing it seems tricky: ${x;%} reliably errors whether or not x is >> set, ${x~#%} never does (I can't find what ~ is supposed to do here in the >> man >> page, > > Of course the first one errors -- `x;' is not a

Re: [Toybox] bash continues to confuse me.

2020-07-05 Thread Chet Ramey
? The bash version of readline and the standalone version of readline >> are identical. Identical consisting of the same source. > > Ask https://github.com/akinomyoga/ble.sh ? Yeah, no. > >>>> Sure. That's why declare reports `?' as not found. It's not a variable.

Re: [Toybox] bash continues to confuse me.

2020-07-01 Thread Chet Ramey
but triggers in the else case of that test. Yes, `+' is the opposite of `-'; I feel like Bourne was being clever when he decided on that syntax. > I have a great big todo item to make a math parser. I did an elaborate one in > java years ago that handled triginometric functions and fractional > exponentiation and such. But that was a long enough time ago I still thought > digital watches Java was a pretty neat idea. I remember there were > two stacks and I learned why reverse polish notation exists. You'd compare > precedence to see whether you push the operation and argument, or perform it > now > and possibly consume your way down the tree, which is why I had to bother the > posix guys to put the precedence BACK when they broke it in their html > rendering > of the expr command years ago because when I sat down to try it there they'd > broken the spec... That sounds ... complicated. 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/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

Re: [Toybox] bash continues to confuse me.

2020-06-30 Thread Chet Ramey
e. > > $ echo ${*@notanerror} Well, you can short-circuit if there are no positional parameters (in which case `*' ends up expanding to null), or you can error because neither `n' (bash-5.0) nor `notanerror' is a valid transformation operator. It's the same thing as above. > >

Re: [Toybox] bash continues to confuse me.

2020-06-21 Thread Chet Ramey
the behavior of constructs like ${@##...} and #{@:..}, and others, than to jam the parameters together. -- ``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: [Toybox] bash continues to confuse me.

2020-06-21 Thread Chet Ramey
On 6/18/20 7:48 PM, Rob Landley wrote: > On 6/18/20 1:46 PM, Chet Ramey wrote: >> On 6/17/20 1:22 PM, Rob Landley wrote: >>> Trying to figure out when spaces are and aren't allowed in ${blah} led to >>> asking >>> why echo ${!a* } is an error but ${!a@

Re: [Toybox] bash continues to confuse me.

2020-06-18 Thread Chet Ramey
On 6/18/20 2:46 PM, Chet Ramey wrote: >> I'm pretty sure the array mangling logic ties in here somehow, but there's >> some >> missing error checking somewhere... > > Invalid transformation operators just expand to nothing. Sorry, that's not right. Variables with

Re: [Toybox] bash continues to confuse me.

2020-06-18 Thread Chet Ramey
result being used as the parameter for the rest of the expansion. > > I'm pretty sure the array mangling logic ties in here somehow, but there's > some > missing error checking somewhere... Invalid transformation operators just expand to nothing. --

Re: [Toybox] Would someone please explain what bash is doing here?

2020-06-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://tiswww.cwru.edu/~chet/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

Re: [Toybox] Ok, I've given myself a headache trying to understand this one.

2020-05-29 Thread Chet Ramey
``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-29 Thread Chet Ramey
On 5/29/20 2:09 PM, Chet Ramey wrote: >>> Bash-5.1 will change the way it does $SECONDS to use gettimeofday(), btw. >> >> Meanwhile, I'm fielding: >> >> https://github.com/landley/toybox/pull/210 > > Ironically, gettimeofday() is more portable.

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-29 Thread Chet Ramey
use gettimeofday(), btw. > > Meanwhile, I'm fielding: > > https://github.com/landley/toybox/pull/210 Ironically, gettimeofday() is more portable. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevi

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-28 Thread Chet Ramey
t suite that assumes all the tests _succeed_ is easy to write. If you mean "succeed or fail in predictable ways when given incorrect input," sure. If you're worried about leaving stray background jobs around, end your test script with `wait'. But you can always save a background job's pi

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-27 Thread Chet Ramey
ve something in the background, and you know its job number or how to refer to it using %name, you can run bg and fg to your heart's content, use `kill' to kill it, and use `wait' to clean up. Job control, at least the terminal-based aspects of it, is n

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-25 Thread Chet Ramey
On 5/25/20 6:39 AM, Rob Landley wrote: > On 5/24/20 4:32 PM, Chet Ramey wrote: >>> In new tab: >>> $ echo $LINENO\ >>> > $LINENO >>> 22 >>> $ echo $LINENO >>> 3 >>> >>> It cares about the space. >>

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-24 Thread Chet Ramey
On 5/24/20 5:05 PM, Rob Landley wrote: > On 5/24/20 3:46 PM, Chet Ramey wrote: >>> No, I meant the LINENO on the second line isn't noticing it's on a later >>> line, >>> it's now reporting the first line for both LINENOs, and I thought my initial >&g

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-24 Thread Chet Ramey
and can return to its own caller asking for additional > continuations because of unfinished blocks and here documents and trailing > flow > control characters). So you're saying that `&' can either be a WORD (in the grammar sense) or an operator depending on context? If that'

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-24 Thread Chet Ramey
; confusion was about it NOT doing that? I'm not sure myself. The backslash-newline gets removed, so the command is a single logical line, which, since the lexer was on line 1 when the parser figured out it was parsing a simple command, is all on line 1. The simple command gets the line numbe

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-23 Thread Chet Ramey
st of shell WORDs, and a command list, which is terminated by the *operator* `&'. Unquoted `&' is always an operator, it is never a WORD, and so it can't appear in a list of WORDs, which is what follows `in'. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-23 Thread Chet Ramey
On 5/23/20 1:06 PM, Rob Landley wrote: > On 5/23/20 9:41 AM, Chet Ramey wrote: >> On 5/21/20 6:50 PM, Rob Landley wrote: >> >>>>> But the same command line in the current shell and in bash -c are parsing >>>>> different despite presumably reading the

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-23 Thread Chet Ramey
d > to reboot the mainframe to stop. I got in trouble for that.) Now that seems like a reaction due to embarrassment. It's not like the developers could have done input validation or anything. > Leaving posterity in a good position is sort of the point of the exercise, > though: Well, you hope to, at least. -- ``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/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-20 Thread Chet Ramey
On 5/19/20 4:03 PM, Rob Landley wrote: > On 5/18/20 10:41 AM, Chet Ramey wrote: >> On 5/17/20 7:11 AM, Rob Landley wrote: >>> I had a reply window open to this when my laptop battery died, and >>> thunderbird >>> doesn't store unfinished messages like kmail an

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-18 Thread Chet Ramey
pics to consider. > I only started using bash in 1998. :) And it was 10 years old at that time. Man, we've come a long way. > If your current locale setting has an appropriate gettext database > installed, > $"strings" get looked up and replaced with translate

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-11 Thread Chet Ramey
to be translated according to the current locale. If the >current locale is C or POSIX, the dollar sign is ignored. If the >string is translated and replaced, the replacement is double-quoted. > > was supposed to work. (HOW is it translated? Bash calls out to > translate.google.com to convert english to japanese? Is there a thing humans > can > do to supply an external translation file? Is it just converting dates and > currency markers and number grouping commas?) You have a message catalog, install the right files, and use the gnu gettext infrastructure to get translated versions of the strings you mark. It's a shell script way of doing what bash does internally for its own messages. Very little-used. > Ah, gettext. That would explain why I don't know about it. I always used > http://penma.de/code/gettext-stub/ in my automated Linux From Scratch test > builds because it's one of those gnu-isms like info and libtool. It will be in Posix one day. 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/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-10 Thread Chet Ramey
On 5/8/20 4:17 PM, Rob Landley wrote: > On 5/6/20 2:32 PM, Chet Ramey wrote: >> On 5/6/20 2:08 PM, Rob Landley wrote: >> >>>> You're blogging these bash corner cases, too? >>> >>> I was. I was recently asked to stop. >> >> Who asked you to s

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-06 Thread Chet Ramey
ards. Hey, it's supposed to be brief. I did consider how to handle the long options, since it's easy to do the one-letter options, and decided there wasn't really a better way to do it. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-05 Thread Chet Ramey
On 5/5/20 1:47 PM, Rob Landley wrote: > On 5/4/20 1:16 PM, Chet Ramey wrote: >>> Still trying to work out what the "bash spec" would be, vs implementation >>> details... >> >> I'll be interested when you get that spec done. > > I'd love to read it

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-04 Thread Chet Ramey
On 5/4/20 12:20 PM, Rob Landley wrote: > On 5/4/20 8:39 AM, Chet Ramey wrote: >> On 5/2/20 4:01 PM, Rob Landley wrote: >> >>> Why does the export flag on $_ toggle? >> >> It does three different things. It's initially exported if bash inherits it >&

Re: [Toybox] Would someone please explain what bash is doing here?

2020-05-04 Thread Chet Ramey
.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

Re: [Toybox] Would someone please explain what bash is doing here?

2020-04-25 Thread Chet Ramey
rne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

Re: [Toybox] Would someone please explain what bash is doing here?

2020-04-24 Thread Chet Ramey
On 4/24/20 3:07 PM, Rob Landley wrote: > > > On 4/24/20 10:55 AM, Chet Ramey wrote: >> On 4/24/20 9:48 AM, Rob Landley wrote: >>> Try this in bash, and hit ctrl-Z before it returns: >>> >>> /bin/echo $(ls /usr/bin; sleep 5) >>> >>>

Re: [Toybox] Would someone please explain what bash is doing here?

2020-04-24 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://tiswww.cwru.edu/~chet/ ___ Toybox mailing list Toybox@lists.landley.net http:/

Re: [Toybox] Would someone please explain what bash is doing here?

2020-04-02 Thread Chet Ramey
u have to do more work that arrays give you for free. Since your primary group is in ${GROUPS[0]}, referencing $GROUPS give you your primary group in a painless fashion. If you don't have arrays, you're not constrained by bash's builtin array variables anyway. 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/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

Re: [Toybox] Would someone please explain what bash is doing here?

2020-04-02 Thread Chet Ramey
On 4/1/20 6:20 PM, Chet Ramey wrote: > Dynamic variables only have their value functions called when the variable > is referenced. When the variables are simply fetched (declare -p, and > similar) or enumerated (building an export array), you get the value > stored in the var

Re: [Toybox] Would someone please explain what bash is doing here?

2020-04-01 Thread Chet Ramey
and RANDOM, at least, should accept arithmetic expressions on assignment. I'll make that change. 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/~

Re: [Toybox] Would someone please explain what bash is doing here?

2020-04-01 Thread Chet Ramey
will make that change in the next devel branch push. 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: [Toybox] Would someone please explain what bash is doing here?

2020-03-16 Thread Chet Ramey
On 3/16/20 8:54 AM, Rob Landley wrote: > On 3/13/20 1:45 PM, Chet Ramey wrote: >> On 3/13/20 12:27 PM, enh wrote: >> >>>> The dash folks would say so. >>> >>> except now you need two shells :-) >> >> Well, that's their bed. I would say

Re: [Toybox] Would someone please explain what bash is doing here?

2020-03-13 Thread Chet Ramey
Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

Re: [Toybox] Would someone please explain what bash is doing here?

2020-03-13 Thread Chet Ramey
- Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

Re: [Toybox] Would someone please explain what bash is doing here?

2020-03-13 Thread Chet Ramey
n again, I'm trying to implement more functionality in that budget than > dash > is. Does that make it less minimalist? The dash folks would say so. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTe

Re: [Toybox] Would someone please explain what bash is doing here?

2020-03-12 Thread Chet Ramey
On 3/12/20 12:53 PM, Rob Landley wrote: > On 3/12/20 9:37 AM, Chet Ramey wrote: >> On 3/11/20 11:55 PM, Rob Landley wrote: >>> Word splitting isn't really a seperate step, exactly? "echo one two three" >>> doesn't care about $IFS, and the out

Re: [Toybox] Would someone please explain what bash is doing here?

2020-03-12 Thread Chet Ramey
th. -- ``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/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

Re: [Toybox] Would someone please explain what bash is doing here?

2020-03-12 Thread Chet Ramey
sible. > > Also expansion of arguments should use the same or similar > logic... so "rm -" -> "rm ./-" if there is a file "./-" would help. This is something to suggest to the bash-completion folks. -- ``The lyf so short, the craft so long to lerne.'' -

Re: [Toybox] Would someone please explain what bash is doing here?

2020-03-10 Thread Chet Ramey
remove everything that's not in posix", that was just a side effect. Minimalism and POSIX conformance are the big selling points now, at least on the shell side of things. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita

Re: [Toybox] Would someone please explain what bash is doing here?

2020-03-10 Thread Chet Ramey
ita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/ ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

Re: [Toybox] Would someone please explain what bash is doing here?

2020-03-10 Thread Chet Ramey
On 3/9/20 4:10 PM, Rob Landley wrote: > On 3/8/20 2:57 PM, Chet Ramey wrote: >> Remember the brouhaha (this was at least 15 years ago) about the standard >> saying that `set -e' only applied to simple commands and bash having the >> audacity to implement what the stan

Re: [Toybox] Would someone please explain what bash is doing here?

2020-03-08 Thread Chet Ramey
On 3/8/20 2:55 PM, Rob Landley wrote: > On 3/8/20 11:44 AM, Chet Ramey wrote: >> On 3/8/20 10:53 AM, Rob Landley wrote: >>> >>> I read through the posix shell bits long enough ago it was probably SUSv3 >>> rather >>> than v4, but at the moment

Re: [Toybox] Would someone please explain what bash is doing here?

2020-03-08 Thread Chet Ramey
to be an array, so as long as you DTRT when IFS is a string variable, you should be free to do whatever you like. > Sorry to bother you, I should have (and eventually did) figure this out for > myself. No bother. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

Re: [Toybox] Would someone please explain what bash is doing here?

2020-03-08 Thread Chet Ramey
On 3/6/20 9:05 PM, Rob Landley wrote: >>> you could try chet ramey or the bash mailing list... he joins in a lot >>> of the shell discussions on the POSIX mailing list. >> >> I'm reluctant to trigger a change in bash's behavior that it's been doing >> consis