On Thursday, May 22, 2025, Bruce Dubbs wrote:
> with cstd-23 'bool' is a keyword
This is something the configure script should check. Otherwise why have one?
--
Oğuz
On Tuesday, April 8, 2025, A. James Lewis wrote:
>
> I have however found it extremely frustrating to open TCP connections
> via /dev/tcp, because there appears to be no way to control the
> timeout!
Same. It'd be nice if bash gave up after $TMOUT seconds
--
Oğuz
gt;
And how is this a Bash problem?
--
Oğuz
m sure; if built-in printf and GNU printf differ in common use
cases that's a clear bug from the user's perspective.
--
Oğuz
dopted by GNU printf, otherwise
the user will have two flavors of printf on the same system by the same
name. `-v varname' is irrelevant because it's obvious an external command
can't change the value of a shell variable.
--
Oğuz
as usual
--
Oğuz
On Saturday, February 8, 2025, Martin D Kealey
wrote:
>
> ls -mU /proc/$$/fd
> ls -log /proc/$$/fd/99
>
They should appear in the output of `ls -l /proc/self/fd' in order for it
to be considered leakage
--
Oğuz
On Thu, Jan 30, 2025 at 8:27 PM Muhammed Mahmood
wrote:
> I'm curious as to why you think that it's not worth it for this functionality
> to be in an option.
Fewer options to remember the better.
> Actually, upon closer inspection, the line of code you shared still seems a
> bit incomplete.
Y
On Wednesday, January 29, 2025, Muhammed Mahmood via Bug reports for the
GNU Bourne Again SHell wrote:
>
> Ideally, there should be a wait -e which waits for every child process but
> exits on the first non zero exit code received.
>
`while wait -n; do :; done' already does that
--
Oğuz
by
child shells when SHELLOPTS is exported may be warranted but anything
beyond that would be noise.
--
Oğuz
in adding an environment variable that does the same
thing.
--
Oğuz
ly (namely igncr),
Try BASH_ENV instead:
https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#index-BASH_005fENV
--
Oğuz
On Thursday, January 2, 2025, Martin D Kealey
wrote:
>
> On Thu, 2 Jan 2025 at 14:25, Oğuz wrote:
>
>> I don't see any upsides either. What's the point?
>>
>
> New features don't have to make sense to everyone
>
If adding that feature involves me
On Thursday, January 2, 2025, Martin D Kealey
wrote:
>
> Do you see any downsides to this approach?
>
I don't see any upsides either. What's the point?
--
Oğuz
On Tuesday, November 26, 2024, Martin D Kealey
wrote:
>
> Would anyone object to adjusting the output of ‘command -V’ to be identical
> to ‘type -a’?
>
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/command.html
--
Oğuz
What's the point? Just write `printf %d $((6*7))'. Shouldn't have relied on
undocumented features in the first place though
--
Oğuz
On Sunday, November 24, 2024, Martin D Kealey
wrote:
>
> This REALLY needs to be driven home both in the explanation and with
> examples, preferably with at least one that illustrates using more than one
> character class inside one match group.
>
In another document, not the manual.
--
Oğuz
t's time "you" switched shells and stop bothering "us".
--
Oğuz
On Sunday, November 17, 2024, G. Branden Robinson <
g.branden.robin...@gmail.com> wrote:
>
> recondite
>
That's a recondite word, isn't it Sunday where you live?
--
Oğuz
countered by a neophyte reading this manual page in
> 2024.)
>
> (*2: this may require some finessing of nroff to ensure that it does NOT
> substitute curly quotes or otherwise mess with the shell syntax, so that
> users can simply copy & paste the example code to test it)
>
This belongs in separate, unofficial document; not the reference manual,
which is fine as is.
--
Oğuz
On Monday, November 4, 2024, Martin D Kealey
wrote:
> POSIX says that the execve syscall reads the name of an interpreter (and
> options) from a '#!' line,
>
Where?
--
Oğuz
FOO
if (foo && zot)
#else
if (bar && zot)
#endif
{
--
Oğuz
oth the indent program and some editors.
>
It looks a lot cleaner than the alternatives you provided. What are the
names of these editors?
--
Oğuz
On Sun, Oct 13, 2024 at 3:18 AM Chet Ramey wrote:
> You have two processes fighting over stdin.
Why though? Can't bash just close the procsub's stdin when `:' returns?
On Saturday, October 12, 2024, Zachary Santer wrote:
>
> Backwards compatibility with people's expectations
No one expects children of the same parent to be able to wait for
eachother. It's common sense.
--
Oğuz
On Saturday, October 12, 2024, David Moberg wrote:
> This link shows a big commit to bash. Is it merged to main/release? Can I
> try it out?
>
You can clone the devel branch to try it out. The master branch is only
updated for releases and important patches.
--
Oğuz
The first letter I type after running this command won't show up on
the terminal:
: < <(cat)
This is reproducible on 5.3 beta too.
Oğuz
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 option. Like something you can put in FCEDIT
--
Oğuz
On Fri, Sep 20, 2024 at 12:00 PM shynur . wrote:
> Editors needn't give "bash-fc.NN" special handling, IMO.
A good editor would.
On Fri, Sep 20, 2024 at 11:20 AM shynur . wrote:
> - When Emacs opens a file named "bash-fc.NN.bash",
> it'll enable sh-mode automatically
Vim does that without the .bash extension. What stops Emacs from doing the same?
On Friday, September 20, 2024, shynur . wrote:
>
> editors that use *suffixes* to infer what syntax
> highlighting should be enabled.
>
For example?
--
Oğuz
On Wed, Sep 18, 2024 at 4:19 AM Steffen Nurpmeso wrote:
>
It boils down to this:
f(){ echo $#;}; set "" "" ""; IFS=x; f $*
bash, NetBSD and FreeBSD sh, and ksh88 all agree and print 2. pdksh
prints 3 but mksh and oksh print 1. dash, ksh93, yash, and zsh print
0.
On Monday, September 9, 2024, Zachary Santer wrote:
> Slightly improved wait-n-failure attached.
It's >100 lines and your replies are too long. Summarize what you want so
others can contribute too without having to waste time reading the whole
thread.
--
Oğuz
ut changing how Bash is
built.
--
Oğuz
On Wed, Aug 14, 2024 at 5:23 PM Robert Elz wrote:
> However, as ksh93 makes "" from this
> expansion, and so probably ksh88 might have done as well
No, both Sun and SCO variants expand "$@$@" to zero fields when $# is 0.
roduce an empty field, except that if the other parts are all within the
same double-quotes as the '@', it is unspecified whether the result is zero
fields or one empty field.
--
Oğuz
On Saturday, August 10, 2024, Martin D Kealey
wrote:
> Sorry, that was supposed to be a personal reply off-list.
>
Do you always harass foreigners like that or was it an exception?
--
Oğuz
lity that makes setting up FIFOs easier, I
don't know.
--
Oğuz
noise as how many procsubs you expand on the command line.
>
And that's too many. Much more than async jobs.
--
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
unction or sourced script" and completion returns to
normal.
Oğuz
it' waiting for a
procsub that I forgot about and that won't be listed by `jobs' is not.
Procsubs occupying one slot in the shell's internal list of job statuses is
acceptable, them filling up that list and causing data loss/oom errors is
not.
--
Oğuz
n. Didn't we already discuss this and
agree that `wait -n' should wait jobs one by one without skipping any? Did
it not make it to 5.3?
--
Oğuz
On Mon, Jul 8, 2024 at 11:16 AM Martin D Kealey wrote:
> The only things that the shell has going for it is that it's widely deployed
> and stable over the long term.
> Otherwise it's a terrible language, and any sane programmer should avoid it
> entirely:
> This has already been happening, and
-s compat52' should suffice to opt out of the new default. No point
in making it more complicated than that.
--
Oğuz
ing else?
--
Oğuz
On Saturday, June 29, 2024, Zachary Santer wrote:
>
> Couldn't you do the exact same thing with regular background processes
> forked with &?
>
But the shell notifies me when they terminate and reap them.
--
Oğuz
On Sat, Jun 29, 2024 at 3:47 PM Zachary Santer wrote:
> Why not just wait for all process substitutions?
What if I substitute thousands of processes and never call wait?
y changing it. Bash is too good to ruin like that.
--
Oğuz
',
`${a[1..10..3]}', etc. These would expand like `$@' when in double quotes
and like `$*' when being assigned to a variable.
--
Oğuz
On Tue, Jun 25, 2024 at 3:32 PM Emanuele Torre wrote:
> There are actually ways to call them:
>
> $ %f(){ echo hi;}
> $ compgen -F %f
> bash: compgen: warning: -F option may not work as you expect
> hi
Neat
precedence over jobspecs?
Oğuz
On Mon, Jun 24, 2024 at 2:37 PM Gioele Barabucci wrote:
> $ printf -v b "\xc3\xbf\xbe"
>
> $ printf "$b" | { while LC_ALL=C read -N1 c; do \
> LC_ALL=C.UTF-8 printf "%d %q\n" "'$c" "$c"; done; }
> 195 $'\303'
> 255 $'\277'
> 190 $'\276'
Can't reproduce this on Ubuntu 22.04 with Bash 5.3-alph
On Thursday, June 20, 2024, Léa Gris wrote:
>
> Would it be a valid option, then to make BASH_SOURCE contain the real path
> in all circumstances?
>
Sounds good to me.
--
Oğuz
ory of the source script, I just don't need it and it wasn't what we
were discussing.
--
Oğuz
On Sat, Jun 15, 2024 at 4:59 PM Koichi Murase wrote:
> Sorry, I think I misunderstood the part "behind the user's back". Now I
> guess you were talking about the behavior of `checkwinsize' when `set
> -a' is enabled?
Yes. All I'm saying is, a variable that affects how certain programs
behave when
env | grep COLUMNS
$ env | grep COLUMNS
COLUMNS=64
This is true for non-interactive shells where job control is enabled as
well.
If Bash didn't export COLUMNS implicitly but you wanted it to take effect,
you'd export it yourself once and it'd work fine. Clean and straightforward.
--
Oğuz
esented in OP,
wouldn't you think something was broken? What keeps Bash from exempting
LINES and COLUMNS from `set -a' other than "it's been like this forever"?
--
Oğuz
aviour do not get impacted by the
> shell used to call them.
>
> Even more reason to use `ps axww' instead of `ps ax'.
> What do you think ?
>
> I think there's at least one Bash bug involved here.
--
Oğuz
S
$ env | grep COLUMNS
COLUMNS=64
You should call ps with the option -w if you want wide output though. On
some implementations you can disable truncation completely by specifying it
twice like `ps axww'.
--
Oğuz
or where the last successful read command left it?
--
Oğuz
See:
$ while read; do :; done
POSIX Issue 8 will require that this feature is supported, see
https://www.austingroupbugs.net/view.php?id=1592
Perhaps a future version of Bash will have it.
--
Oğuz
While you're at it take a look at this too:
true; for (( ; $? == 0; ${ ! break;} )); do uname; done
Once you run this command bash gets stuck in a state where it prints
the prompt string and reads commands but doesn't execute anything. If
you press Ctrl+C it returns to normal.
Oğuz
See:
$ bash -c 'for (( $(case x in x) esac);; )); do :; done'
bash: -c: line 1: syntax error: `;' unexpected
bash: -c: line 1: syntax error: `(( $(case x in x)
;;
esac);; ))'
This is reproducible on 5.3 alpha too.
Oğuz
On Thu, May 23, 2024 at 2:49 AM Steffen Nurpmeso wrote:
> Only to note that this is not portable.
> The FreeBSD shell will not assign "b" to "c" for this one!
Nor will NetBSD sh. This lets you swap values of two variables without
using a third
$ x=1 y=2
$ x=$y y=$x
$ echo $x $y
2 1
And some Bou
hey don't clash and source with
`${BASH_SOURCE%/*}' prepended to PATH and it'll work fine.
This feature request sounded promising at first, it feels like
bike-shedding now.
--
Oğuz
On Monday, May 13, 2024, Chet Ramey wrote:
> performs the setpgid in the process forked
> to run the process substitution).
>
Yes, this sounds like the easy way. I don't know how else to prevent the
race in OP. Close stdin/stdout? Direct it from /dev/null?
--
Oğuz
On Sun, May 12, 2024 at 4:33 PM Andreas Schwab wrote:
> Since the redirection fails and the cat command is never started, bash
> doesn't switch the terminal process group
It does on my computer:
554 ioctl(255, TIOCSPGRP, [554]) = 0
553 execve("/usr/bin/wc", ["wc", "-l"], 0x55706d7bac10
On Sun, May 5, 2024 at 7:36 AM Matheus Afonso Martins Moreira
wrote:
> I certainly intend to use it as one should it be merged.
If it's not you should try turning this into a loadable builtin. An
`include' command that lets you selectively import variables/functions
from a larger collection and n
On Fri, May 3, 2024 at 6:41 PM Chet Ramey wrote:
> We're only talking about interactive shells here. Non-interactive shells
> have printed something like this, but including the pid, for forever:
>
> ./x1: line 2: 65124 Killed: 9 ( kill -9 $BASHPID )
Never seen this and it's ugly to
ct if their scripts
started printing that though, take more people's opinions on that please.
--
Oğuz
On Thu, May 2, 2024 at 8:44 PM Chet Ramey wrote:
> I'm not planning to change the text. The point is whether or not this
> counts as `notification' for the purposes of the jobs list, which allows
> the shell to remove the job from the list.
And what change of behavior discernible by the average u
ns though;
the one sent when a foreground job is killed is useful when the shell is
non-interactive too, the other not so much. I don't know why the standard
doesn't cover it, but if you plan to follow zsh in this I don't think
that's a good idea. It's ugly and confusing.
--
Oğuz
On Thu, May 2, 2024 at 6:10 PM Chet Ramey wrote:
> There's no real difference between the two statements; there is a
> clarification for consistency with the language in the new "Job
> Control" section in Issue 8.
Yeah it doesn't clarify anything and the new job control section is
pointlessly det
On Thu, May 2, 2024 at 3:55 PM Chet Ramey wrote:
> A paraphrase of what?
Issue 7 says this:
By default, the jobs utility shall display the status of all stopped
jobs, running background jobs and all jobs whose status has changed
and have not been reported by the shell.
And Issue 8 draft, this:
On Wed, May 1, 2024 at 10:36 PM Chet Ramey wrote:
> Sure. Then you wonder why POSIX bothered to include "and all jobs whose
> status has changed and have not been reported by the shell" in the
> standard.
No, I think it's a botched paraphrase. Issue 7 says "By default, the
jobs utility shall disp
On Tuesday, April 30, 2024, Chet Ramey wrote:
>
> comsubs). I can work around this case, but I'm still interested in what
> people think the general rule should be.
>
I don't think anyone would expect to run `jobs' and see anything but
asynchronous and stopped jobs.
--
Oğuz
On Fri, Apr 26, 2024 at 4:57 AM Dan Shelton wrote:
> Could you do this for the next alpha release, please?
Run `find -name Makefile -exec sed -i 's/\$[({]MFLAGS[)}]//g' {} +'
and it'll work. What's the hurry?
On Fri, Apr 26, 2024 at 1:17 AM Grisha Levit wrote:
> Actually, I see this on Ubuntu 22.04 but not on macOS.
On Linux, O_EXCL and RX_EXPANDED (a flag used by bash to signal that
the redirection word is already expanded) has the same value. I don't
know why bash doesn't clear its internal flags bef
On Mon, Apr 22, 2024 at 10:24 AM Kerin Millar wrote:
> I cannot find anything in the manual that concretely explains why bash
> behaves as it does in this instance.
Me neither, but the current behavior is useful. Take `while false |
false; do :; done' for example, if bash reported the status of
j flag from it?
--
Oğuz
bash.
>
Bash's behavior matches that of dash in POSIX mode. This is documented here
in the 8th item https://tiswww.case.edu/php/chet/bash/POSIX
--
Oğuz
On Tue, Apr 9, 2024 at 5:17 AM Robert Elz wrote:
> Sure, it is possible to make a useless program like this ...
> Almost all real commands use stdio to read stdin. Playing about
> any more with this absurd example isn't worth the bother. The relevant
> text should simply be deleted from POSIX
On Mon, Apr 8, 2024 at 5:32 PM Robert Elz wrote:
> The effect is that sharing stdin between the shell script, and other
> commands (than read), is almost certainly never going to work,
Why not? It works fine with other shells
$ cat tst.sh
cat
On Mon, Apr 8, 2024 at 5:58 AM Robert Elz wrote:
> Shells interpret their input in much the same way, regardless of
> from where it comes. Would you really want your login shell to
> just collect commands that you type (possibly objecting to those
> with syntax errors) but executing none of them
And why this non-stop nagging? If you want maintainership ask for it, or is
your plan boring us all to death first?
--
Oğuz
ooks like a
> hyperlink back into a hyperlink, which is how you get clickable links in
> the footnote.
>
They don't actually type those brackets then. Thanks
--
Oğuz
On Mon, Mar 25, 2024 at 8:38 PM G. Branden Robinson
wrote:
> [1]
> [1] http...
I keep seeing this. Why don't you guys just paste the link?
a
bare-bones shell for small, embedded systems.
--
Oğuz
the trap set for
an event into a variable if `x=$(trap)' stops working?
--
Oğuz
On Sunday, March 24, 2024, Oğuz wrote:
>
> $ printf '%s\0' "${a[@]@k}" | xargs -0 jq --args -n '$ARGS.positional
> | _nwise(2) | {(.[0]): .[1]}' | jq -s add
>
On reflection, splitting by NULs in JQ is better; there is no guarantee
that xargs will
nal |
_nwise(2) | {(.[0]): .[1]}' | jq -s add
{
"y": "2",
"x": "1"
}
--
Oğuz
'
"${a[@]@k}"
{
"y": "2",
"x": "1"
}
--
Oğuz
On Thu, Mar 21, 2024 at 7:13 PM Gioele Barabucci wrote:
> The command in the first shell will exit after a random number of
> iterations with "terminated with exit status 141".
That's what every other shell does.
> Regardless of the reason for the SIGPIPE, the reporter expects the loop
> to carr
On Sunday, March 17, 2024, tpeplt wrote:
>
>The texinfo version of the bash manual is missing a description of
> the ‘shopt’ option ‘syslog_history’.
>
That must be a vendor extension, bash doesn't have such an option.
--
Oğuz
ating case clauses on the fly, you may not always know which case is
going to be the last. You may not always know that at least one clause is
going to be generated either, but `case x in esac' is valid, so it's not a
problem. The syntax for the case command is neat as-is.
--
Oğuz
On Monday, February 19, 2024, Lawrence Velázquez wrote:
>
> On what system does this happen? The proposed changes might break the
> test suite on some older systems.
>
Agreed. Those egrep invocations can be replaced with `grep -v -e
BASH_VERSINFO -e PIPESTATUS -e GROUPS' though.
--
Oğuz
tiline command, recall it and
edit the first line to introduce a syntax error and hit enter. Does it look
right? Wouldn't it be much better if the entire command were discarded?
--
Oğuz
$ echo ''
rm *
' >z
> ^C
$ ls
$
After the second invocation of `ls' I add a single quote and hit enter
accidentally, and lose all my files. I wish it didn't happen
--
Oğuz
1 - 100 of 348 matches
Mail list logo