Re: waiting for process substitutions

2024-10-12 Thread Oğuz
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

Re: fg via keybind modifies tty settings

2024-10-11 Thread 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

procsub doesn't release the terminal without reading one byte

2024-10-09 Thread 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

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

2024-09-20 Thread 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

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

2024-09-20 Thread 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.

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

2024-09-20 Thread Oğuz
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?

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

2024-09-20 Thread Oğuz
On Friday, September 20, 2024, shynur . wrote: > > editors that use *suffixes* to infer what syntax > highlighting should be enabled. > For example? -- Oğuz

Re: Question on $IFS related differences (Was: Question on $@ vs $@$@)

2024-09-17 Thread 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.

Re: 'wait -n' with and without id arguments

2024-09-08 Thread Oğuz
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

Re: please make the commit log clean

2024-08-20 Thread Oğuz
ut changing how Bash is built. -- Oğuz

Re: Question on $@ vs $@$@

2024-08-14 Thread 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.

Re: Question on $@ vs $@$@

2024-08-14 Thread Oğuz
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

Re: whats wrong , exit code 11 on android termux

2024-08-09 Thread 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

Re: waiting for process substitutions

2024-08-06 Thread Oğuz
lity that makes setting up FIFOs easier, I don't know. -- Oğuz

Re: waiting for process substitutions

2024-08-06 Thread 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

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

return from trap while reading with readline breaks completion

2024-08-06 Thread Oğuz
unction or sourced script" and completion returns to normal. Oğuz

Re: waiting for process substitutions

2024-08-05 Thread 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

Re: waiting for process substitutions

2024-07-12 Thread 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

Re: proposed BASH_SOURCE_PATH

2024-07-08 Thread 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

Re: proposed BASH_SOURCE_PATH

2024-07-07 Thread Oğuz
-s compat52' should suffice to opt out of the new default. No point in making it more complicated than that. -- Oğuz

waiting for process substitutions

2024-06-29 Thread Oğuz
ing else? -- Oğuz

Re: waiting for process substitutions

2024-06-29 Thread 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

Re: waiting for process substitutions

2024-06-29 Thread 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?

Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices

2024-06-27 Thread Oğuz
y changing it. Bash is too good to ruin like that. -- Oğuz

Re: feature suggestion: ability to expand a set of elements of an array or characters of a scalar, given their indices

2024-06-26 Thread 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

Re: function names starting with %

2024-06-25 Thread 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

function names starting with %

2024-06-24 Thread Oğuz
precedence over jobspecs? Oğuz

Re: printf, binary data, leading single quote and non ASCII codesets

2024-06-24 Thread 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

Re: proposed BASH_SOURCE_PATH

2024-06-20 Thread Oğuz
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

Re: proposed BASH_SOURCE_PATH

2024-06-19 Thread Oğuz
ory of the source script, I just don't need it and it wasn't what we were discussing. -- Oğuz

Re: set -a leads to truncated output from ps

2024-06-15 Thread 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

Re: set -a leads to truncated output from ps

2024-06-14 Thread Oğuz
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

Re: set -a leads to truncated output from ps

2024-06-13 Thread 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

Re: it, soRE: set -a leads to truncated output from ps

2024-06-13 Thread 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

Re: set -a leads to truncated output from ps

2024-06-13 Thread 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

Re: read reads from stale buffer after interrupt

2024-05-31 Thread Oğuz
or where the last successful read command left it? -- Oğuz

read reads from stale buffer after interrupt

2024-05-27 Thread Oğuz
See: $ while read; do :; done

Re: printf %m$ and %*m$ unimplemented in Bash, but implementated in C compilers

2024-05-27 Thread Oğuz
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

Re: yet another $(case ... parse bug

2024-05-23 Thread 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

yet another $(case ... parse bug

2024-05-23 Thread 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

Re: sh vs. bash -xc 'a=b c=$a'

2024-05-22 Thread 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

Re: proposed BASH_SOURCE_PATH

2024-05-16 Thread Oğuz
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

Re: bug in bash

2024-05-13 Thread 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

Re: bug in bash

2024-05-12 Thread 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

Re: Re: Re: Re: [PATCH 0/4] Add import builtin

2024-05-04 Thread Oğuz
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

Re: 5.3-alpha: the `jobs' builtin prints foreground dead jobs with function substitutions

2024-05-03 Thread Oğuz
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

Re: 5.3-alpha: the `jobs' builtin prints foreground dead jobs with function substitutions

2024-05-03 Thread Oğuz
ct if their scripts started printing that though, take more people's opinions on that please. -- Oğuz

Re: 5.3-alpha: the `jobs' builtin prints foreground dead jobs with function substitutions

2024-05-02 Thread 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

Re: 5.3-alpha: the `jobs' builtin prints foreground dead jobs with function substitutions

2024-05-02 Thread Oğuz
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

Re: 5.3-alpha: the `jobs' builtin prints foreground dead jobs with function substitutions

2024-05-02 Thread 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

Re: 5.3-alpha: the `jobs' builtin prints foreground dead jobs with function substitutions

2024-05-02 Thread Oğuz
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:

Re: 5.3-alpha: the `jobs' builtin prints foreground dead jobs with function substitutions

2024-05-01 Thread Oğuz
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

Re: 5.3-alpha: the `jobs' builtin prints foreground dead jobs with function substitutions

2024-05-01 Thread Oğuz
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

Re: bash parallel build: make[1]: warning: -j16 forced in submake: resetting jobserver mode.

2024-04-26 Thread 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?

Re: [5.3-alpha] ">& /some/file" would fail when /some/file already exists

2024-04-25 Thread Oğuz
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

Re: [Help-bash] difference of $? and ${PIPESTATUS[0]}

2024-04-22 Thread Oğuz
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

Re: bash parallel build: make[1]: warning: -j16 forced in submake: resetting jobserver mode.

2024-04-21 Thread Oğuz
j flag from it? -- Oğuz

Re: Exporting functions does not expand aliases in subshells

2024-04-11 Thread 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

Re: Potential Bash Script Vulnerability

2024-04-08 Thread 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

Re: Potential Bash Script Vulnerability

2024-04-08 Thread Oğuz
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

Re: Potential Bash Script Vulnerability

2024-04-08 Thread Oğuz
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

Re: Bug tracking

2024-03-31 Thread Oğuz
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

Debian bug #929178: wrong trap displayed inside functions

2024-03-26 Thread 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

Re: Debian bug #929178: wrong trap displayed inside functions

2024-03-25 Thread 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?

Debian bug #929178: wrong trap displayed inside functions

2024-03-25 Thread Oğuz
a bare-bones shell for small, embedded systems. -- Oğuz

Debian bug #929178: wrong trap displayed inside functions

2024-03-25 Thread Oğuz
the trap set for an event into a variable if `x=$(trap)' stops working? -- Oğuz

Re: "${assoc[@]@k}" doesn't get expanded to separate words within compound assignment syntax

2024-03-24 Thread 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

Re: "${assoc[@]@k}" doesn't get expanded to separate words within compound assignment syntax

2024-03-24 Thread Oğuz
nal | _nwise(2) | {(.[0]): .[1]}' | jq -s add { "y": "2", "x": "1" } -- Oğuz

Re: "${assoc[@]@k}" doesn't get expanded to separate words within compound assignment syntax

2024-03-24 Thread Oğuz
' "${a[@]@k}" { "y": "2", "x": "1" } -- Oğuz

Re: Debian bug #822605: SIGPIPE not handled in "echo >", terminates shell

2024-03-21 Thread 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

Re: Bash 5.2: Missing ‘shopt’ option ‘syslog_history’ in doc/bashref.texi

2024-03-17 Thread Oğuz
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

Re: declare -f does not output esac pattern correctly

2024-02-27 Thread 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

Re: [PATCH] tests/array.tests: using grep -E instead of egrep

2024-02-19 Thread 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

Re: Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed )

2024-02-06 Thread 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

Re: Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed )

2024-02-03 Thread 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

Re: wait -n misses signaled subprocess

2024-01-28 Thread Oğuz
is no point in having `wait -n' if it can't distinguish a single job terminating from multiple jobs terminating between subsequent calls. -- Oğuz

Re: cd"": Shouldn't it fail?

2024-01-28 Thread Oğuz
>If *directory* is an empty string, the results are unspecified. This changes to the following in Issue 8 draft 4: >If directory is an empty string, cd shall write a diagnostic message to standard error and exit with non-zero status. Sorry for the noise. -- Oğuz

Re: cd"": Shouldn't it fail?

2024-01-28 Thread Oğuz
On Sun, Jan 28, 2024 at 5:10 PM wrote: > POSIX Programmer's Manual (cd(1p) manpage) says this: > > [9 unrelated special cases] > > 10. The cd utility shall then perform actions equivalent to the >chdir() function called with curpath as the path argument. If >the

Re: wait -n misses signaled subprocess

2024-01-24 Thread Oğuz
On Mon, Jan 22, 2024 at 8:13 PM Steven Pelley wrote: > > Hello, > I've encountered what I believe is a bug in bash's "wait -n". wait -n > fails to return for processes that terminate due to a signal prior to > calling wait -n. Instead, it returns 127 with an error that the > process id cannot be

Re: ./script doesn't work in completion function

2024-01-22 Thread Oğuz
On Mon, Jan 22, 2024 at 3:25 PM Greg Wooledge wrote: > But in any case, writing a "script" without a shebang and then counting > on the shell to work around the broken script is not ideal. Unlike shebangs that behavior is standardized. Which is what I consider ideal. Thanks for your input

Re: ./script doesn't work in completion function

2024-01-22 Thread Oğuz
bash would take a hacky approach like that for implementing this basic functionality. It must be something else -- Oğuz

./script doesn't work in completion function

2024-01-20 Thread Oğuz
he right in the second case instead of showing the completion options. This is reproducible on both the devel branch and 5.1.16, I didn't test 5.2. Oğuz

Re: nofork command substitution bugs

2024-01-12 Thread Oğuz
On Fri, Jan 12, 2024 at 7:05 PM Chet Ramey wrote: > Nofork command substitution freezes the jobs list, because you don't > want jobs appearing and disappearing in the list while you're running > word expansion. If the jobs list is frozen, wait -n doesn't even try > waiting, since you don't want jo

nofork command substitution bugs

2024-01-04 Thread Oğuz
These bugs affect the development branch only. 1. `wait -n' doesn't work inside nofork command substitution. I think it should, or wait without `-n' shouldn't work either, or what works and what doesn't should be documented. $ sleep 3 & sleep 1; echo ${| wait -n -p REPLY;} [1] 433 $

inconsistent handling of closing brace inside no-fork command substitution

2024-01-03 Thread Oğuz
x $ I don't think this should be a syntax error because the closing brace is not in a place it can terminate the command substitution. Oğuz

Re: A feature request regarding redirection to variables

2023-12-18 Thread Oğuz
On Mon, Dec 18, 2023 at 7:39 AM Luke Tidd wrote: > > A very common thing I need to do when writing bash is to collect both > the stdout and stderr of a command. This can be done relatively > reasonably with files but it would be very attractive to be able to > redirect these directly to a variable

Re: bash should consult .config/bash/...

2023-12-10 Thread Oğuz
On Sunday, December 10, 2023, Koichi Murase wrote: > > In that case, a question would be what would be the standard way to > specify the Bash-specific variable, > There doesn't have to be a standard way; I'd set it in ~/.profile, you'd set it wherever is convenient on your setup.

Re: bash should consult .config/bash/...

2023-12-09 Thread Oğuz
ariable like BASH_HOME when looking for rc files instead of exploring a fixed path. -- Oğuz

Re: Missing documentation "-bash_input"

2023-11-28 Thread Oğuz
#x27; foo foo: -c: line 1: unexpected EOF while looking for matching `"' $ You wouldn't want the entire script printed for every error. -- Oğuz

Re: FEATURE REQUEST : shell option to automatically terminate child processes on parent death

2023-11-11 Thread Oğuz
command forks, its children won't receive the death signal when the shell dies. It doesn't make any sense. Unless there is a way to make it stick and affect all descendants of the shell process, I don't think this would be very useful as a loadable builtin either. -- Oğuz

Re: FEATURE REQUEST : shell option to automatically terminate child processes on parent death

2023-11-11 Thread Oğuz
listen to various events (udev events, window manager events, > etc) often leave orphan processes behind when terminated forcefully. > > I've attached a proof-of-concept patch. I think it'd make more sense to implement this as a loadable builtin. -- Oğuz

Re: Idea: jobs(1) -i to print only :%ID:s

2023-11-09 Thread Oğuz
bout it. > Can't you abuse jobs -x somehow? Like this perhaps jobs -x printf '%s\n' %{1..100} | awk '!/%/{print "%"NR}' -- Oğuz

Re: Defaults when cross-compiling

2023-11-07 Thread Oğuz
On Tuesday, November 7, 2023, Chet Ramey wrote: > > It's interesting that musl supports brk but not sbrk It doesn't support locales either. I always assumed it's someone's toy project but looks like there are Linux distros shipping it instead of glibc. Huh -- Oğuz

Re: test -lt inconsistent about white space

2023-10-29 Thread Oğuz
On Sun, Oct 29, 2023 at 8:49 AM Paul Eggert wrote: > My understanding is that Bash was intended to allow both leading and > trailing whitespace. This is compatible with ksh and with Dash. If > that's the intent, Bash should be consistent about it, just as ksh and > Dash are. There seems little poi

Re: test -lt inconsistent about white space

2023-10-28 Thread Oğuz
On Saturday, October 28, 2023, Paul Eggert wrote: > Bash should treat trailing whitespace the same way it treats leading > whitespace, Why? The same commands fail on bosh, yash, and zsh too. -- Oğuz

Re: BUG: Colorize background of whitespace

2023-10-26 Thread Oğuz
when emitting SGR before the \n it is wise to have a closing sequence > \n[m\n > I can reproduce this behavior on all the terminals I have access to except xterm on Solaris 10, it never paints the background of a tab, which is at least consistent. I wonder what changed... -- Oğuz

Re: [PATCH] printf: add %#s alias to %b

2023-09-06 Thread Oğuz
On Wed, Sep 6, 2023 at 9:38 AM Robert Elz wrote: > Adding a different %b to printf(1) wasn't currently even proposed, just > deprecating the current one so it wouldn't conflict with the usage of > %b in printf(3) (which is being defined in C23, and is apparently already > firmly entrenched, even t

Re: [PATCH] printf: add %#s alias to %b

2023-09-05 Thread Oğuz
On Tuesday, September 5, 2023, Chet Ramey wrote: > to print binary literals > What's the point? Does anyone need this feature in their shell scripts (and can't afford to use bc for it)? -- Oğuz

Re: RFC: changing printf(1) behavior on %b

2023-08-31 Thread Oğuz
On Fri, Sep 1, 2023 at 7:41 AM Phi Debian wrote: > My vote is for posix_printf %B mapping to libc_printf %b In the shell we already have bc for base conversion. Does POSIX really have to support C2x %b in the first place?

  1   2   3   4   >