How functions are defined

2020-04-27 Thread Dale R. Worley
While I was looking at the details of parsing function definitions, I tripped on something I should have noticed long ago. In the function definition function foo() { command } the '{' should not be recognized as the start of a group, because it is not in one of the positions in

Re: Unbuffered pipes: cases to be supported

2020-04-27 Thread Dale R. Worley
Angel writes: > On 2020-04-23 at 20:20 -0400, Dale R. Worley wrote: >> The cases I've found where bash allocates a pipe, and thus an unbuffered >> pipe may be wanted, are: > > What are you trying to solve? How do you expect those "Unbuffered pipes" > to be implemented? > I don't think there is any

Re: Cannot shadow local -r when assigning local to array in declaration

2020-04-27 Thread Chet Ramey
On 4/23/20 8:02 PM, Ross Goldberg wrote: > Bash Version: 5.0 > Patch Level: 16 > Release Status: release > > Description: > If a function, f, declares a local readonly variable, v, using local -r, an > error occurs if f calls another function, g, that declares its own local > variable v (therefor

Re: in terminal mode

2020-04-27 Thread Greg Wooledge
On Mon, Apr 27, 2020 at 10:40:26AM -0400, Eva Farrell wrote: > I am trying to a password for root, because I do not have one I have over > 30 updates I need to install but it won't let me. When I open Terminal it > says > eva@E4620~$ > > and I try sudo apt-get update it ask for my password however

in terminal mode

2020-04-27 Thread Eva Farrell
I am trying to a password for root, because I do not have one I have over 30 updates I need to install but it won't let me. When I open Terminal it says eva@E4620~$ and I try sudo apt-get update it ask for my password however when I type it, it says it doesn't work with eva@E4620. I don't even kno

Re: Variable references (declare -n, "nameref") are limited to a depth of 8.

2020-04-27 Thread Chet Ramey
On 4/25/20 11:46 PM, Andrej Podzimek wrote: >>> Description: >>> >>> While looking for a way to share a "cache" array with a recursive function >>> call stack (using local -n (nameref)), I hit a well-known problem with >>> "circular name reference" (which has been around for a long time). >>

Re: Removing the shift/reduce conflict in the parser

2020-04-27 Thread Chet Ramey
On 4/26/20 8:14 PM, Dale R. Worley wrote: > I've been annoyed by the fact that parse.y has a shift/reduce conflict. > It stems from the grammar for a function declaration: Thanks for the report and patch. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars