Re: $@ in function gives error

2024-08-17 Thread Freek de Kruijf
Op zaterdag 17 augustus 2024 00:29:23 CEST schreef u: > On Fri, Aug 16, 2024, at 12:59 PM, freek--- via Bug reports for the GNU > There is no problem with "$@" or functions here. The "problem" is > that "$@" expands to multiple fields when there are two or more > positional parameters, so (as the

Re: $@ in function gives error

2024-08-17 Thread alex xmb sw ratchev
On Sat, Aug 17, 2024, 12:42 Freek de Kruijf wrote: > Op zaterdag 17 augustus 2024 00:29:23 CEST schreef u: > > On Fri, Aug 16, 2024, at 12:59 PM, freek--- via Bug reports for the GNU > > > There is no problem with "$@" or functions here. The "problem" is > > that "$@" expands to multiple fields

Re: $@ in function gives error

2024-08-17 Thread Greg Wooledge
On Sat, Aug 17, 2024 at 12:41:45 +0200, Freek de Kruijf wrote: > Apparently I have a problem with the concept of $@, I see it as list of zero > or more non-whitespaced elements, and quotes around it makes it into a single > element. Like a parameter p with a content of zero or more non-whitespace

Re: $@ in function gives error

2024-08-17 Thread Lawrence Velázquez
On Sat, Aug 17, 2024, at 6:41 AM, Freek de Kruijf wrote: > Apparently I have a problem with the concept of $@ Greg has already tried explaining it, so I'll just focus on a few details: > I see it as list of zero or more non-whitespaced elements When used in a context where splitting is performe

Re: $@ in function gives error

2024-08-17 Thread alex xmb sw ratchev
On Fri, Aug 16, 2024, 23:29 freek--- via Bug reports for the GNU Bourne Again SHell wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 > -fstack-protec

[PATCH] Correct error message when using -n and -o ignoreeof in interactive mode

2024-08-17 Thread Milana
Hi Bash Maintainers, I recently encountered an issue while experimenting with different shell options in Bash. When launching Bash with both the `-n` (noexec) and `-o ignoreeof` flags in interactive mode (with no pipes or redirection), pressing `^D` (EOF) results in the message: "Use 'exit' to

Re: [PATCH] Correct error message when using -n and -o ignoreeof in interactive mode

2024-08-17 Thread Robert Elz
Date:Sun, 18 Aug 2024 02:09:10 +0200 From:Milana <948...@riseup.net> Message-ID: | I recently encountered an issue while experimenting with different shell | options in Bash. When launching Bash with both the `-n` (noexec) and `-o | ignoreeof` flags in interac