Segmentation fault and code execution.

2025-06-18 Thread Stan Marsh
This is a "Doctor, it hurts when I do this" type thing. The short answer is that alias substitution occurs very early, so when you type: alias x='this and that' x() { ... } you are for all practical purposes, typing: 'this and that'() { ... } At which point, anything can happen. I

Re: bash 5.3, rc2, "make install" does not populate the share/man/man1 directory

2025-06-14 Thread Stan Marsh
(Followup to my previous post) To answer my own question, I guess it is pretty obvious that the answer to "How to fix?" is "Install texinfo and re-run the make install", but it raises two important questions: 1) Why is the error ignored, making it almost impossible to determine that

Re: bash 5.3, rc2, "make install" does not populate the share/man/man1 directory

2025-06-14 Thread Stan Marsh
I found the problem (I think). See below: --- Cut Here --- make[1]: Entering directory '/home/username/Build/bash-5.3-rc2/doc' rm -f bashref.info makeinfo --no-split -I../lib/readline/doc ./bashref.texi make[1]: makeinfo: Command not found Makefile:181: recipe for target 'bashref.info' failed mak

bash 5.3, rc2, "make install" does not populate the share/man/man1 directory

2025-06-13 Thread Stan Marsh
I did: ./configure --prefix=$HOME/local/bash5 Then make and then make install (all of this is done as a non-root user). It created the directory listed above and all the necessary subdirs, including share/man/man1, but left that directory empty. Shouldn't (at least) a copy of "bash.1" have been p

Re: [bash arithmetic bugs with "++","--","+=1" and "-=1"]

2025-06-13 Thread Stan Marsh
On Fri, Jun 13, 2025 at 07:08:21 -0600, Stan Marsh wrote: > BTW, and only tangentially related, "man bash" says that "let" and "(( ))" are > exactly the same, but "shellcheck" thinks otherwise. "shellcheck" says you > should > use &qu

Re: [bash arithmetic bugs with "++","--","+=1" and "-=1"]

2025-06-13 Thread Stan Marsh
>All of this is intentional, and not a bug. It is possible to be both. But, yes, it reflects a fundamental inconsistency in the C/Unix ecosystem. The fact that in most programming languages (e.g., C, AWK), 0 means false and non-zero means true, but in the shell, it is the opposite. E.g., in AWK

Re: [bash arithmetic bugs with "++","--","+=1" and "-=1"]

2025-06-13 Thread Stan Marsh
>Description: >The shorthands "++", "--", "+=1" and "-=1" in bash arithmetic >erroneously return exit code 1 when a variable is either incremented by >"++" or decremented by "--" from 0 or incremented by "+=1" or decremented >by "-=1" from -1 and 1 respectively, although the variable valu

Re: Meta: `help cut` doesn't document what -a does

2025-06-13 Thread Stan Marsh
On Wed, Jun 11, 2025 at 10:38:17AM -0400, Chet Ramey wrote: > The business of installing the loadables and > headers on `make install' came later as the result of feature requests. > And Duncan, correctly, replied: >Fine for `make install' to *install* them. But it flies in the face of >convention

Re: Building bash 5.3, rc2, warning about mktemp()

2025-06-10 Thread Stan Marsh
Somebody flitted: > Nah This is not an answer. This is just someone blowing off steam. = Please do not send me replies to my posts on the list. I always read the replies via the web archive, so CC'ing to me is unnec

Building bash 5.3, rc2, warning about mktemp()

2025-06-10 Thread Stan Marsh
See below. As far as I can tell, it built OK. Should I be concerned about the warning? --- Cut Here --- rm -f bash gcc -std=gnu11 -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob -L./lib/tilde -L./lib/malloc -L./lib/sh -rdynamic -g -O2 -o bash shell.o eval.o y.tab.o general.o make

Meta: `help cut` doesn't document what -a does

2025-06-06 Thread Stan Marsh
>On Thu, Jun 5, 2025, at 8:37 AM, Stan Marsh wrote: >> Actually, I am not too fond of the habit of having builtins (particularly >> those supplied as part of the distribution) with the same name as well-known >> Unix commands. > >It allows for potential drop-in replaceme

Re: `help cut` doesn`t document what -a does

2025-06-05 Thread Stan Marsh
On Thu, Jun 5, 2025, 12:56 PM Greg Wooledge wrote: > On Thu, Jun 05, 2025 at 12:34:44 +0200, microsuxx wrote: > > i installed bash dev , but there is no `help cut` > > It's a "loadable builtin". You have to build those, install them, > and then load the "cut" builtin explicitly. It was far fro

grouping via {} fails after "test $PIPESTATUS"

2025-05-29 Thread Stan Marsh
I think most of what needs to be said about the technical aspects of this user's question has been said. But I want to make a few suggestions for future practice, both for this mailing list and for the OP. In the gawk-bug list (which is structured very much like this list), they have a setup wh

Problem with vi mode in bash 5.0 beta

2018-12-12 Thread Stan Marsh
(This is all after doing "set -o vi") In previous versions of bash, I could do the following keys: / ^ foo and it would find the most recent command that starts with foo. This is all as expected. However, in bash 5.0 beta (self-compiled), this doesn't work. It always leaves the cursor line e