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

Re: Question on $@ vs $@$@

2024-08-26 Thread alex xmb sw ratchev
try ${@@Q} and ${*@Q} greets On Wed, Aug 14, 2024, 2:45 AM Steffen Nurpmeso wrote: > Hello. > > I include bug-bash even though i think bash is correct, but there > lots of people of expertise are listening, so, thus. > Sorry for cross-posting, nonetheless. > Given this snippet (twox() withou

Re: read command sometimes misses newline on timeout

2024-10-07 Thread alex xmb sw ratchev
well try remove the -n in echo On Monday, October 7, 2024, Thomas Oettli wrote: > Sorry Alex, I don't understand exactly what you mean. > Here is the Test-Script again with some comments: > > function reader() { > local buf line > while :; do &g

Re: read command sometimes misses newline on timeout

2024-10-07 Thread alex xmb sw ratchev
there is a case , u [[ $readreply ]] after read On Monday, October 7, 2024, Thomas Oettli via Bug reports for the GNU Bourne Again SHell wrote: > I agree with you, but it should never happen that read returns timeout, > also returns the full line and has already read the newline character. > If

Re: read command sometimes misses newline on timeout

2024-10-07 Thread alex xmb sw ratchev
the same > situatiation that I hit in a real world example in which I don't control > the input. > -- > *Von:* alex xmb sw ratchev > *Gesendet:* Montag, 7. Oktober 2024 19:17 > *An:* Thomas Oettli > *Cc:* bug-bash@gnu.org ; chet.ra...@case.edu < &g

Re: fg via keybind modifies tty settings

2024-09-22 Thread alex xmb sw ratchev
happened here with nvim and termux same as description On Sunday, September 22, 2024, Martin D Kealey wrote: > Does this happen with any raw-mode application, or just vim? > > When using readline in Emacs mode, the terminal is necessarily in raw mode. > > I suspect what you're seeing is that 'fg

Re: [feature request] Add ".sh" or ".bash" extension to tmpfile generated by `fc`

2024-09-22 Thread alex xmb sw ratchev
On Saturday, September 21, 2024, Chet Ramey wrote: > On 9/21/24 1:03 AM, Oğuz wrote: > >> On Saturday, September 21, 2024, Koichi Murase > > wrote: >> >> Emacs has `auto-mode-alist'. VS Code has `files.associations'. >> >> >> I think he meant a command line opti

Re: (question) fast split/join of strings

2024-09-17 Thread alex xmb sw ratchev
savedifs=${IFS@A} savedifs=${savedifs:- unset -v IFS } str=1,2,3 IFS=, arr=( $str ) joined=${arr[*]} eval "$savedifs" alternative middleline sep=, str=1$sep2$sep3 IFS=$sep arr=( $str ) joined=${arr[*]} ( at var=assignment , quotes dont matter , excepts to bind spaced code together as cmd or cmd

Re: (question) fast split/join of strings

2024-09-17 Thread alex xmb sw ratchev
in the printf to stdout a final printf \\n is missing greets On Tuesday, September 17, 2024, alex xmb sw ratchev wrote: > savedifs=${IFS@A} savedifs=${savedifs:- unset -v IFS } > str=1,2,3 IFS=, arr=( $str ) joined=${arr[*]} > eval "$savedifs" > > alternative middle

Re: (question) fast split/join of strings

2024-09-17 Thread alex xmb sw ratchev
do , its newer to me i forgot all about it already thanks greets On Tuesday, September 17, 2024, Greg Wooledge wrote: > On Tue, Sep 17, 2024 at 16:07:58 +0200, alex xmb sw ratchev wrote: > > savedifs=${IFS@A} savedifs=${savedifs:- unset -v IFS } > > str=1,2,3 IFS=, arr=( $str ) join

Re: (question) fast split/join of strings

2024-09-17 Thread alex xmb sw ratchev
cool .. gotta do .. thxx n greets .. On Tuesday, September 17, 2024, Greg Wooledge wrote: > On Tue, Sep 17, 2024 at 17:00:16 +0200, alex xmb sw ratchev wrote: > > plz what does 'local -' do , its newer to me > > i forgot all about it already > >

Re: Suggested BASH Improvement

2024-09-17 Thread alex xmb sw ratchev
another is ${var##0} On Wednesday, September 18, 2024, BRUCE FOWLER via Bug reports for the GNU Bourne Again SHell wrote: > An interesting problem I ran into recently: > > I have a shell script that I run about once a month that > "screen-scrapes" from the output of another program using the > s

<    2   3   4   5   6   7