Re: waiting for process substitutions

2024-08-06 Thread Zachary Santer
On Tue, Aug 6, 2024 at 3:20 PM Oğuz wrote: > > To me it just shows how lost you are, sorry. Perhaps you should consider > other languages, or write a utility that makes setting up FIFOs easier, I > don't know. All the scripts I've discussed in this email list run and act on the output of extern

Re: Potentially misleading documentation of SECONDS variable

2024-08-06 Thread Ángel
On 2024-08-06 at 17:17 +0200, Bash-help via Bug reports for the GNU Bourne Again SHell wrote: > #!/bin/bash > > while true; do > SECONDS=0 > sleep 0.5 > if [ "$SECONDS" != "0" ]; then > printf 'This is unexpected: %s != 0\n' "$SECONDS" > fi > done > > As we sleep less than

Re: Potentially misleading documentation of SECONDS variable

2024-08-06 Thread bash
On Tue, Aug 06, 2024 at 03:58:35PM -0400, Chet Ramey wrote: > [...] Bash has never looked at > anything but whole seconds. [...] > Ok, cool. So this is not a bug but rather just how Bash works. That's fine but then I think the documentation could reflect the actual behaviour better. I found this "

Re: Potentially misleading documentation of SECONDS variable

2024-08-06 Thread Chet Ramey
On 8/6/24 11:17 AM, Bash-help via Bug reports for the GNU Bourne Again SHell wrote: Reading the manual at regarding the SECONDS variable, it states that " [..] Assignment to this variable resets the count to the value assigned, a

Re: whats wrong , exit code 11 on android termux

2024-08-06 Thread alex xmb sw ratchev
.. thanks tho , greycat .. greets .. On Tue, Aug 6, 2024, 21:38 alex xmb sw ratchev wrote: > my argument against function was its way slower > it isnt much for this project but the overall ' timings adding ' project > > if its a bash bug , my code's not fault , and i really prefer such be fixed

Re: whats wrong , exit code 11 on android termux

2024-08-06 Thread alex xmb sw ratchev
my argument against function was its way slower it isnt much for this project but the overall ' timings adding ' project if its a bash bug , my code's not fault , and i really prefer such be fixed On Tue, Aug 6, 2024, 21:07 Greg Wooledge wrote: > On Tue, Aug 06, 2024 at 20:59:08 +0200, alex xmb

Re: waiting for process substitutions

2024-08-06 Thread Oğuz
On Tuesday, August 6, 2024, Zachary Santer wrote: > > This I guess makes a further point about the need to anticipate what > shell programmers might want or need to be able to do. To me it just shows how lost you are, sorry. Perhaps you should consider other languages, or write a utility that ma

Re: whats wrong , exit code 11 on android termux

2024-08-06 Thread Greg Wooledge
On Tue, Aug 06, 2024 at 20:59:08 +0200, alex xmb sw ratchev wrote: > maybe its this i completly dunno > > i guess i must start use devel branch ? > > On Tue, Aug 6, 2024, 20:45 Grisha Levit wrote: > > > On Tue, Aug 6, 2024, 14:19 alex xmb sw ratchev wrote: > > > >> ~ $ alias tm='timemark+=( $E

Re: whats wrong , exit code 11 on android termux

2024-08-06 Thread alex xmb sw ratchev
maybe its this i completly dunno i guess i must start use devel branch ? On Tue, Aug 6, 2024, 20:45 Grisha Levit wrote: > On Tue, Aug 6, 2024, 14:19 alex xmb sw ratchev wrote: > >> ~ $ alias tm='timemark+=( $EPOCHREALTIME )' >> ~ $ tm >> >> [Process completed (signal 11) - press Enter] >> > >

Re: whats wrong , exit code 11 on android termux

2024-08-06 Thread Grisha Levit
On Tue, Aug 6, 2024, 14:19 alex xmb sw ratchev wrote: > ~ $ alias tm='timemark+=( $EPOCHREALTIME )' > ~ $ tm > > [Process completed (signal 11) - press Enter] > I believe this was reported in https://lists.gnu.org/archive/html/bug-bash/2023-05/msg00146.html and fixed in https://git.savannah.gnu.

Re: waiting for process substitutions

2024-08-06 Thread Zachary Santer
On Tue, Aug 6, 2024 at 10:21 AM Oğuz wrote: > > On Tuesday, August 6, 2024, Zachary Santer wrote: >> >> How bash is actually used should guide its development. > > Correct. No one waits for procsubs in their scripts or on the command line. On Wed, Jul 3, 2024 at 8:40 PM Zachary Santer wrote: >

whats wrong , exit code 11 on android termux

2024-08-06 Thread alex xmb sw ratchev
~ $ alias tm='timemark+=( $EPOCHREALTIME )' ~ $ tm [Process completed (signal 11) - press Enter] btw is it to send to bug and help .. ?

Re: Bogus (intptr_t) casts

2024-08-06 Thread Chet Ramey
On 8/6/24 9:36 AM, Martin D Kealey wrote: Why just those ones? Mainly: (a) I'm looking at patching that area of the code for other reasons, so they're the ones that I happened to encounter; and (b) I didn't want to over-cook it, so I only included the ones where I could see that it was actually

Re: Potentially misleading documentation of SECONDS variable

2024-08-06 Thread bash
On Wed, Aug 07, 2024 at 01:25:35AM +0900, Koichi Murase wrote: > is supposed to imply that technically. It says "The number of seconds > at shell invocation", so the starting time point is considered to have > only the "second" resolution and doesn't have the subsecond > resolution. Then, when a va

Re: Potentially misleading documentation of SECONDS variable

2024-08-06 Thread alex xmb sw ratchev
i think this includes if u start a bash set clock 1h to future and query after 1s , it may show not 0 or 1 second On Tue, Aug 6, 2024, 18:26 Koichi Murase wrote: > 2024年8月7日(水) 0:24 Bash-help via Bug reports for the GNU Bourne Again > SHell : > > Reading the manual at > >

Re: Potentially misleading documentation of SECONDS variable

2024-08-06 Thread Koichi Murase
2024年8月7日(水) 0:24 Bash-help via Bug reports for the GNU Bourne Again SHell : > Reading the manual at > > regarding the SECONDS variable, it states that > " [..] Assignment to this variable resets the count to the value assigned, >

Re: Potentially misleading documentation of SECONDS variable

2024-08-06 Thread alex xmb sw ratchev
try unset -v SECONDS first On Tue, Aug 6, 2024, 17:24 Bash-help via Bug reports for the GNU Bourne Again SHell wrote: > Reading the manual at > > regarding the SECONDS variable, it states that > " [..] Assignment to this varia

Potentially misleading documentation of SECONDS variable

2024-08-06 Thread Bash-help via Bug reports for the GNU Bourne Again SHell
Reading the manual at regarding the SECONDS variable, it states that " [..] Assignment to this variable resets the count to the value assigned, and the expanded value becomes the value assigned plus the number of seconds since the

Re: waiting for process substitutions

2024-08-06 Thread Oğuz
On Tuesday, August 6, 2024, Zachary Santer wrote: > > How bash is actually used should guide its development. Correct. No one waits for procsubs in their scripts or on the command line. In a script, a child process being a job or not makes no difference, > from the shell programmer's perspectiv

Re: waiting for process substitutions

2024-08-06 Thread Zachary Santer
On Tue, Aug 6, 2024 at 9:09 AM Oğuz wrote: > > On Tue, Aug 6, 2024 at 2:58 PM Zachary Santer wrote: > > I can not think of a time when I called 'wait' from the command line > > that wasn't just for testing something. Even using process > > substitutions on the command line is a relative rarity fo

Re: shell-expand-line working strangely without shebangs

2024-08-06 Thread Chet Ramey
> Thank you! Indeed a build from branch bash-5.3-testing shows the issue to be > fixed (devel did not build for me). I look forward to the release of the fix. What error did you get when you tried to build devel? (I assume this was on NixOS). Chet -- ``The lyf so short, the craft so long to le

Re: Bogus (intptr_t) casts

2024-08-06 Thread Martin D Kealey
Why just those ones? Mainly: (a) I'm looking at patching that area of the code for other reasons, so they're the ones that I happened to encounter; and (b) I didn't want to over-cook it, so I only included the ones where I could see that it was actually a pointer (casting a number to an intptr_t do

Re: [bug #66068] built-in printf function not working with float

2024-08-06 Thread Chet Ramey
On 8/6/24 5:58 AM, anonymous wrote: jesusm@liet:[~]$ bash --version GNU bash, version 5.2.32(1)-release (x86_64-slackware-linux-gnu) Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software; you are fre

Re: waiting for process substitutions

2024-08-06 Thread Oğuz
On Tue, Aug 6, 2024 at 2:58 PM Zachary Santer wrote: > I can not think of a time when I called 'wait' from the command line > that wasn't just for testing something. Even using process > substitutions on the command line is a relative rarity for me. If > we're balancing behavior on the command lin

Re: waiting for process substitutions

2024-08-06 Thread alex xmb sw ratchev
On Tue, Aug 6, 2024, 13:59 Zachary Santer wrote: > On Tue, Aug 6, 2024 at 1:19 AM Oğuz wrote: > > > > The benefit is they're separate from async jobs and don't get in your > way. `wait' waiting for the last procsub is acceptable, `wait' waiting for > a procsub that I forgot about and that won't

Re: waiting for process substitutions

2024-08-06 Thread Zachary Santer
On Tue, Aug 6, 2024 at 1:19 AM Oğuz wrote: > > The benefit is they're separate from async jobs and don't get in your way. > `wait' waiting for the last procsub is acceptable, `wait' waiting for a > procsub that I forgot about and that won't be listed by `jobs' is not. I can not think of a time

Re: [bug #66068] built-in printf function not working with float

2024-08-06 Thread Greg Wooledge
On Tue, Aug 06, 2024 at 05:58:56 -0400, anonymous wrote: > jesusm@liet:[~]$ bash --version > GNU bash, version 5.2.32(1)-release (x86_64-slackware-linux-gnu) > Copyright (C) 2022 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > > This

[bug #66068] built-in printf function not working with float

2024-08-06 Thread anonymous
URL: Summary: built-in printf function not working with float Group: The GNU Bourne-Again SHell Submitter: None Submitted: Tue 06 Aug 2024 09:58:54 AM UTC Category: None

return from trap while reading with readline breaks completion

2024-08-06 Thread Oğuz
See: $ ls foo s $ cat s trap return INT read -e $ source s I press Ctrl-C here and bash prompts me for the next command. Then I press F and Tab; instead of producing the bell sound bash completes f to foo. If I press Ctrl-C again it prints "bash: return: can only `return' from a function or sour

Re: proposed BASH_SOURCE_PATH

2024-08-06 Thread konsolebox
On Tue, Aug 6, 2024 at 3:09 PM konsolebox wrote: > > On Thu, Jul 25, 2024 at 9:10 PM Chet Ramey wrote: > > > > On 7/18/24 4:44 PM, konsolebox wrote: > > > On Thu, Jul 18, 2024 at 11:02 PM Chet Ramey wrote: > > >> > > >> On 7/11/24 3:51 AM, konsolebox wrote: > > >>> On Thu, Jul 11, 2024 at 4:08 A

Re: proposed BASH_SOURCE_PATH

2024-08-06 Thread konsolebox
On Thu, Jul 25, 2024 at 9:10 PM Chet Ramey wrote: > > On 7/18/24 4:44 PM, konsolebox wrote: > > On Thu, Jul 18, 2024 at 11:02 PM Chet Ramey wrote: > >> > >> On 7/11/24 3:51 AM, konsolebox wrote: > >>> On Thu, Jul 11, 2024 at 4:08 AM Chet Ramey wrote: > and the BASH_SOURCE > absolute pa