Re: Shell Grammar man page

2021-02-25 Thread Ángel
On 2021-02-25 at 16:13 +0100, Mike Jonkmans wrote: > > Readers are likely to be familiar with simple commands and > > pipelines, especially the ones who primarily use interactive > > shells. I disagree that the average reader is likely to be familiar > > with grammars. > > Aren't grammars taught a

Re: Shell Grammar man page

2021-02-25 Thread Ángel
On 2021-02-26 at 00:45 +0100, Mike Jonkmans wrote: > On Thu, Feb 25, 2021 at 11:15:36PM +0100, Ángel wrote: > > I really doubt so. I expect they would teach Dutch¹ grammar, but that's > > quite different than formal grammars such as those of yacc. > > Maybe you might use

Re: Misleading error when attempting to run foreign executable

2021-10-10 Thread Ángel
I agree with Ilkka and Alex: it would be helpful to show a different error message in this case. I know about ELF format and what leads to this, and it's still slightly confusing when faced to it. You have to double-check that the file is indeed there (not a mistyped command), and then locate the

Re: Misleading error when attempting to run foreign executable

2021-10-12 Thread Ángel
On 2021-10-12 at 00:48 +0700, Robert Elz wrote: > | When execve returns this error for what is a clearly invalid > reason, > > The problem is that sometimes it will probably be an invalid reason > (that's where the race conditions can matter, that the file was there > when it was checked doesn't

Re: Arbitrary command execution in shell - by design!

2021-10-30 Thread Ángel
On 2021-10-29 at 22:41 -0700, L A Walsh wrote: > > This is quite unfair. > Huh? It's true--look at how functions have to be stored in > the environment because someone was able to hack "their > own system" where they already have unrestricted shell access. > > If that isn't ugly or lame, what i

Re: Why should `break' and `continue' in functions not break loops running outside of the function?

2021-10-30 Thread Ángel
On 2021-10-30 at 23:07 +0700, Robert Elz wrote: > For people who don't believe that all programming languages should work > the same way (usually the same way as the one they learned first) this > isn't necessarily as important - but that's a tiny majority of people. Uh? That's a quite different s

Re: bash manual on interactive shell

2021-12-18 Thread Ángel
On 2021-12-13 at 11:23 +, Kerin Millar wrote: > You mentioned being confused by how the and's and or's combine. The > wording of the bash man page seems marginally less ambiguous in that > regard, partly owing to its sparse use of the comma. > > "An interactive shell is one started without non

Re: Corrupted multibyte characters in command substitutions

2022-01-03 Thread Ángel
Hello Frank I think that had you tested the devel branch instead of the last release, you could have skipped a lot of testing (but how would you have known? it's an easy thing to miss). https://savannah.gnu.org/patch/?10035 seems to have gone the "easy fix", which you discarded to get a more thoro

Re: Corrupted multibyte characters in command substitutions

2022-01-07 Thread Ángel
On 2022-01-08 at 00:22 +0100, Frank Heckenbach wrote: > Ángel wrote: > > > I think that had you tested the devel branch instead of the last > > release, you could have skipped a lot of testing (but how would you > > have known? it's an easy thing to miss). >

Re: Corrupted multibyte characters in command substitutions

2022-01-07 Thread Ángel
On 2022-01-06 at 17:03 -0500, Chet Ramey wrote: > On 1/3/22 6:02 PM, Ángel wrote: > > > Or, an even simpler one (assuming a utf-8 locale, like almost > > everyone uses these days): > > $ printf "%511s\xc3\xa4" | ./bash -c 'a="$(echo a)"

bug-bash@gnu.org

2022-01-23 Thread Ángel
On 2022-01-21 at 01:43 +0900, Koichi Murase wrote: > Thank you. I'll later work on it though I actually don't have > confidence in my English ability. Anyway, I believe other people can > correct my broken English. > -- > Koichi Your English reads fine here :-)

Re: Bash-5.2-alpha available

2022-01-23 Thread Ángel
s an *indexed* array. However, I think it would be preferable not to use a name which conflicted with the pronoun... Regards Ángel

Re: Corrupted multibyte characters in command substitutions fixes may be worse than problem.

2022-02-07 Thread Ángel
On 2022-02-07 at 11:55 +0100, Alex fxmbsw7 Ratchev wrote: > > > however my solution still stays > > > you just use memory locations instead of c strings > > > and those entries in memory are of course of known length, before > > > setting and all is fine > > > > "Your" solution is decades old. Ev

Re: 'hash foo' may fail, and would require something like 'hash /usr/bin/foo'

2022-03-10 Thread Ángel
On 2022-03-09 at 20:35 +0100, Andreas Schwab wrote: > On Mär 09 2022, Chet Ramey wrote: > > > Ultimately, this comes down to gaps in the release engineering. > > That won't help, the container image often comes from a different source > than the docker package. The system (under all those condit

Re: Login to a remote machine.

2022-04-10 Thread Ángel
On 2022-04-09 at 17:14 -0700, Ayoub Misherghi wrote: >Hi, > Below I show two ways I ssh logged into a machine. > In the first method I referred to the remote machine > as 192.168.0.212 while in the second method I referred to the > remote machine as [1]testuser5@192.168.0.212 s

Re: bash 5.1 heredoc pipes problematic, shopt needed

2022-04-24 Thread Ángel
On 2022-04-23 at 14:46 -0400, Lawrence Velázquez wrote: > On Fri, Apr 22, 2022, at 9:51 AM, Sam Liddicott wrote: > > Fix: > > Please could we at least have a shopt to maintain the old > > behaviour? > > Perhaps BASH_COMPAT=5.0 could be extended to handle this. I think a shopt makes more s

Re: bash 5.1 heredoc pipes problematic, shopt needed

2022-04-28 Thread Ángel
On 2022-04-25 at 10:40 -0400, Chet Ramey wrote: > > > Perhaps BASH_COMPAT=5.0 could be extended to handle this. > > > > I think a shopt makes more sense. Forcing heredocs to be files > > although something legit to request, is more a caller workaround to > > bugs in called programs. > > Shell opt

Re: BASH recursion segfault, FUNCNEST doesn't help

2022-06-04 Thread Ángel
On 2022-06-02 at 20:00 +, Gergely wrote: > Well, the issue is not the fact that this is a resource exhaustion, > but rather the fact that it's entirely OS-dependent and the > programmer has zero control over it. The programmer could have avoided creating an infinite source file recursion. I d

Re: Parallelization of shell scripts for 'configure' etc.

2022-06-14 Thread Ángel
On 2022-06-13 at 18:32 -0700, Paul Eggert wrote: > Yes, all that could be done in theory, but it'd take a lot of > hacking and it's been decades and it hasn't happened. > > I'd rather have shell scripts "just work" in parallel with a minimum > of fuss. If this hasn't happened, that might be becau

Re: add custom environment variable in bash source code

2022-08-17 Thread Ángel
On 2022-08-17 at 10:09 +0800, b1431736...@163.com wrote: > excuse me, how can I join the custom environment variable > into the source code of Bash, and see this variable when execute env You probably need to export the variable in .bash_profile or .bashrc files. As Chet said, there would

Re: Handling files with CRLF line ending

2022-12-08 Thread Ángel
On 2022-12-07 at 12:38 +, Chris Elvidge wrote: > I don't use Python generally, but my understanding of it (only a > quick test) > > f = open("demofile2.txt", "a") > f.write("Now the file has more content!") > f.close() > > f.write doesn't append either \r\n or \n unless specified. > > f.writ

Re: Adding support of the z/OS platform

2023-05-16 Thread Ángel
On 2023-05-16 at 16:10 +, Igor Todorovski wrote: > Is it enough to just provide this patch location once they’re cleaned > up? I confirmed that they apply to the master branch. Please note that master is not the branch you expect it to be. You should check that they apply cleanly to the devel

Re: nofork command substitution

2023-05-16 Thread Ángel
On 2023-05-15 at 13:35 -0400, Chet Ramey wrote: > There is an alternate form of command substitution: > > ${C COMMAND; } I find this description confusing, as it looks like a literal 'C'. I suggest: > There is an alternate form of command substitution: > > ${ COMMAND; } a

Re: maybe a bug in bash?

2023-07-02 Thread Ángel
On 2023-06-30 at 15:49 +0200, Sebastian Luhnburg wrote: > First, in my LPIC-1 course the lecturer tell me it is better (not > binding) to deny SSH login for root users (especially for the user with > the name root). The reason is simple: decrease the attack surface. Yes, > a secure password need

Re: git amend commit with backticks on cli causes tty to crash

2023-07-30 Thread Ángel
On 2023-07-20 at 10:31 -0700, Wiley Young wrote: > But of course, I forgot the second single quote! Press [Ctrl-d]. > > #+++ > bash: unexpected EOF while looking for matching `'' > #+++ > > Add one single quote, press [Ctrl-d}; no response. Press [e

Re: comments inside command subst are handled inconsistently

2023-07-31 Thread Ángel
On 2023-07-31 at 09:15 -0400, Chet Ramey wrote: > On 7/30/23 2:21 PM, Martin D Kealey wrote: > > > Seriously though, the internet is awash with "helpful" Shell guides > > and > > examples loaded with poor practices. The only way this is going to > > improve > > is if there's a "linting mode" is

Re: using exec to close a fd in a var crashes bash

2023-08-23 Thread Ángel
On 2023-08-23 at 10:34 -0400, Greg Wooledge wrote: > So... {var}> redirections were introduced in bash 4.1, and > varredir_close in bash 5.2. That means that in all versions from > bash 4.1 to 5.1, you will need the separate "exec {fd}>&-" to close > the temp FD. At this point, it hardly seems wo

Re: error message lacks useful debugging information

2023-10-05 Thread Ángel
On 2023-10-04 at 20:05 -0400, Dave Cigna wrote: > Here's how I encountered the problem. You might not be able to > reproduce > it on your machine, but that doesn't mean that it's not a bug with > bash: > > download: candle_1.1.7.tar.gz > from: https://github.com/Denvi/Candle > Extract to the fold

Re: bash encountered a coredump issue with stepping on memory

2024-01-03 Thread Ángel
On 2023-12-06 at 07:20 -0500, Greg Wooledge wrote: > On Wed, Dec 06, 2023 at 05:28:19PM +0800, wang yuhang via Bug reports for the > GNU Bourne Again SHell wrote: > > When the for loop reaches env, the values of each env are: > > > [...] > > (gdb) p env[16] > > $21 = 0x7ffce3c2e25a "DIRNAME_AL

Re: document that read built-in can't return zero-length string in the middle of input

2024-01-11 Thread Ángel
On 2024-01-11 at 09:29 -0500, Chet Ramey wrote: > On 1/11/24 2:37 AM, ilya Basin wrote: > > Dear. > > I needed to read 16 bytes from a binary file and tried to replace a > hexdump call with read built-in. I expected that with "-N1" if a NUL > character is encountered bash would assign an empty stri

Re: Line wrapping issues

2017-08-14 Thread Ángel
On 2017-08-10 Leon Klingele wrote: > Is this problem caused by bash? > Most likely, something done by fzf is not "completely right" as in fzf sets up things in a way that bash is then unable to determine the right width of the line it was asked to print. I guess the sourced file corresponds to th

Re: broken pipe from func-output by changing network settings?

2017-10-17 Thread Ángel
On 2017-10-17 at 03:28 -0700, L A Walsh wrote: > I run the test using cygwin, and use /dev/zero and /dev/null -- > creating those files in my home directory on each platform. > > That way I can copy from /dev/zero on one platform to /dev/null on the other > or vice-versa to get timings of file tra

Re: broken pipe from func-output by changing network settings?

2017-10-17 Thread Ángel
On 2017-10-17 at 14:28 -0400, Daniel Mills wrote: > > Cygwin implements mkfifo, which bash will use in place of /dev/fd The provided error messages suggest that bash is trying to use /dev/fd: > R:bin/iotest: line 112: /dev/fd/62: No such file or directory > cat: write error: Broken pipe

Re: ctrl-w oddity on bash-4.4

2017-10-24 Thread Ángel
On 2017-10-22 at 21:08 -0500, Eduardo A. Bustamante López wrote: > On Sun, Oct 22, 2017 at 06:52:12PM -0400, Aron Griffis wrote: > > I'm seeing some strange behavior and don't know if it's a bug or intended. > [...] > > If this is intentional then I'd be curious about the rationale. > > Please rea

Re: Bash: sleep execution issue with bash loadable builtins

2017-11-27 Thread Ángel
On 2017-11-27 at 17:47 +0530, Thiruvadi Rajaraman wrote: > Reproducible test case and Console logs: > Simpler test case: bash-4.4-rc1# cd examples/loadables/ bash-4.4-rc1/examples/loadables# enable -f ./sleep sleep bash-4.4-rc1/examples/loadables# sleep 1 &

Re: Bash: sleep execution issue with bash loadable builtins

2017-12-04 Thread Ángel
On 2017-12-04 at 16:38 +0530, Thiruvadi Rajaraman wrote: > Hi Chester, > > Based on your review comments and suggestions about the earlier fixes, > reworked on the fix with pselect() > to block the signal. > Blocked the SIGCHLD signal using sigprocmask(). > > Attached the reworked fix patch for y

Re: [annoyance/non-feature] On OS X, every process is "occupying" CWD, making disk ejects impossible after cd'ing into them.

2018-01-16 Thread Ángel
On 2018-01-16 at 22:36 +0800, Danyel Bayraktar wrote: > This is my first e-mail here — I would love to help implement this if you > give me some pointers and a contribution guide. > > Best regards, > Danyel. As Greg mentions, this is the same on other Unix systems too. Now, as you mention, this

Re: History of bash's support for self-modifying shell scripts?

2018-09-10 Thread Ángel
On 2018-09-09 at 22:25 -0700, Josh Triplett wrote: > (I don't want to use this mechanism myself; I'm asking because I'm > working on a project that needs to care about various shells' > compatibility requirements, and I wanted to find out more about this > unusual corner case.) The Thompson shell

Re: bug in dirname loadable?

2019-01-06 Thread Ángel
On 2018-12-26 at 12:35 -0500, Chet Ramey wrote: > Yes, dirname should skip over a `--' denoting the end of options. Thanks > for the report. This was fixed on bash-20181226 snapshot (89b3a79), however with this change on devel branch the basename builtin no longer compiles, as it should have also

Re: loadable cat bug?

2019-01-22 Thread Ángel
On 2019-01-21 at 20:03 -0600, Peng Yu wrote: > When I use the loadable cat, I may get the following error. The input > is a fifo in this specific case. > > cat: cannot open /tmp/tmp.VXkbqFlPtH: Interrupted system call > > So far, I can not make a minimal script to demonstrate the problem. > But i

Re: UUID as Array Keys strangely not possible

2019-01-29 Thread Ángel
On 2019-01-26 at 07:55 +, Robert White wrote: > I've already gone through and replaced or refactored all the > double-square-bracket evaluations with single-square-bracket > expressions, and otherwise looked for any explicit arithmatic contexts > that might be confusing the issue. > > The c

Re: Mozilla's Security Warning for Link For Maintainer's "Bash Page" Link ......

2019-05-09 Thread Ángel
On 2019-05-05 at 16:22 +, Harvey Rothenberg wrote: > To Whom It May Concern, > > I'm receiving a " Warning : Potential Security Rick Ahead " by my use of > FireFox on my Xubuntu 18.04 Laptop (see screenshot below). > > Thanks Harvey I also receive this error. Seems the webmaster of t

Re: [FR] save command times and exit status in history automatically

2019-11-07 Thread Ángel
On 2019-11-07 at 12:18 -0800, Daniel Colascione wrote: > Maybe what I > really want is something like $?, but instead of containing exit > status, it would contain information from a struct rusage (derived > from wait4) for the last command. Or something like that anyway. I would like having those

Re: Running 32 bit program on 64 bit system makes bash etc. look bad

2019-11-13 Thread Ángel
On 2019-11-02 at 07:56 +0800, 積丹尼 Dan Jacobson wrote: > $ mapping/taipower/pole2tm > bash: mapping/taipower/pole2tm: No such file or directory > > Must be a bash bug! Proof: > $ ls -l mapping/taipower/pole2tm > -rwxr-xr-x 1 jidanni jidanni 11290 2012-06-19 mapping/taipower/pole2tm > > But wait,

Re: set -e ignored in subshell if part of command list

2019-11-14 Thread Ángel
On 2019-11-13 at 11:30 -0500, Chet Ramey wrote: > On 11/13/19 10:59 AM, Shaun Crampton wrote: > > But the commands in the subshell execute inside a different shell > > execution context so they shouldn't have > > their own set -e context (Section 2.12)? > > Why? That section says the only thing th

Re: [PATCH] Add active mark, face support; activate mark on paste

2020-04-15 Thread Ángel
On 2020-04-11 at 18:04 +0200, gentoo_eshoes wrote: > $ echo ${PS1@A} > declare -x PS1=$'\\\n---\\n\\\n\\[\\a\\]\\\n\\[\\e[1;37m\ > \e[42m\\]\\u@\\H\\[\\e[0m\\] \\\n\\[\\033[1;30m\\]$(date "+%Y/%m/%d % > H:%M:%S")\\[\\033[0m\\] \\\n\\[\\e[0;37m\\]\\s\\V t:\\l j:\\j \\\nd: > ${SHLVL} pp:${PPI

Re: Unbuffered pipes: cases to be supported

2020-04-25 Thread Ángel
On 2020-04-23 at 20:20 -0400, Dale R. Worley wrote: > The cases I've found where bash allocates a pipe, and thus an unbuffered > pipe may be wanted, are: What are you trying to solve? How do you expect those "Unbuffered pipes" to be implemented? I don't think there is any buffering going on in the

Re: Seg fault on "echo ~nosuchuser"

2020-06-01 Thread Ángel
On 2020-06-01 at 15:12 -0400, Chet Ramey wrote: > I finally found a case where 16-byte alignment for memory returned by > malloc() is required. But it's only on Linux systems that use systemd. > I bet it's trying to marshal arguments for IPC and uses instructions > that require 16-byte alignment. >

Re: Bug on bash shell - $PWD (and consequentely prompt) not updated while renaming current folder.

2020-06-20 Thread Ángel
On 2020-06-20 at 14:02 -0400, Chet Ramey wrote: > It's a way to make sure PWD is correct after a `cd'. Without options, `cd' > canonicalizes its pathname argument in the way POSIX describes in > > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cd.html#tag_20_14 > > That converts it to

Re: Bash reference manual errata

2020-07-10 Thread Ángel
On 2020-07-10 at 09:06 -0400, Chet Ramey wrote: > On 7/10/20 4:24 AM, 홍홍 wrote: > > In Bourne shell > > builtin(https://www.gnu.org/software/bash/manual/bash.html#Bourne-Shell-Builtins > > > > ), > > shift command > > >

Re: bashbug's default editor

2020-07-31 Thread Ángel
On 2020-07-31 at 11:26 -0400, Eli Schwartz wrote: > In the sentence in the bashbug manpage, does the word "default" refer to > the probing or what happens when probing fails? > > My belief is that people reading the manpage will understand it to mean > the former (more natural reading). > > Your

Re: Issue with Bash

2020-07-31 Thread Ángel
On 2020-07-31 at 10:13 -0400, Chet Ramey wrote: > > I'm going to have to test some more. When I tried it, all the shells > died. > (I did send the SIGHUP from another terminal.) I was using ksh93 as > the parent and bash-5.0.18 as the interactive bash, running on macOS. This is probably AIX-speci

Re: Is this a bug?

2020-08-20 Thread Ángel
On 2020-08-19 at 20:55 +, George R Goffe wrote: > Chet, > > I tried several times to create the problem. I think I succeeded. I did > install the "debuginfo" files I could find but it looks like libnss_sss.so's > debuginfo isn't built properly? It's supplied by sssd-client. I tried > instal

Re: Bash parameter expansion (remove largest trailing match, remove largest leading match, pattern replacement) does not work

2020-08-29 Thread Ángel
On 2020-08-30 at 05:53 +0900, Koichi Murase wrote: > > It's a bit more complicated than that; if, for example, some > > excerpt ended up in regression tests, there would be a question > > about whether or not there was a copyright violation. As I > > understand the GPL (IANAL), it requires all par

Re: New Feature Request

2021-01-01 Thread Ángel
On 2020-12-27 at 13:30 -0500, Saint Michael wrote: > Yes, superglobal is great. > Example, from the manual: > " Shared Memory > Shared memory allows one or more processes to communicate via memory > that appears in all of their virtual address spaces. The pages of the > virtual memory is referenced

Re: non-executable files in $PATH cause errors

2021-01-10 Thread Ángel
On 2021-01-10 at 08:52 +0100, n952162 wrote: > Hello, > > I consider it a bug that bash (and its hash functionality) includes > non-executable files in its execution look-up and then (inevitably) > simply reports an error, because its such files aren't executable. > > Perhaps it's there to suppo

Re: Use of `mktemp' is dangerous, better use `mkstemp'...

2021-01-15 Thread Ángel
On 2021-01-15 at 10:00 -0500, Chet Ramey wrote: > On 1/14/21 11:45 PM, Jeffrey Walton wrote: > > Hi Everyone, > > > > I'm building Bash 5.1 from sources. This may be of interest: > > > > /usr/bin/ld: ./lib/sh/libsh.a(tmpfile.o): in function > > `sh_mktmpname': > > /home/jwalton/Build-Scripts/bash

Re: Crash in malloc.c : internal_malloc under Asan

2021-01-15 Thread Ángel
On 2021-01-15 at 17:11 -0500, Jeffrey Walton wrote: > Hi Everyone, > > I'm trying to use an Asan-instrumented version of Bash for my shell. > Bash is dying in startup code. The source file is malloc.c (missing > from Bash sources at > https://git.savannah.gnu.org/cgit/bash.git/tree/), and the func

Re: Crash in malloc.c : internal_malloc under Asan

2021-01-15 Thread Ángel
On 2021-01-15 at 17:11 -0500, Jeffrey Walton wrote: > Hi Everyone, > > I'm trying to use an Asan-instrumented version of Bash for my shell. > Bash is dying in startup code. The source file is malloc.c (missing > from Bash sources at > https://git.savannah.gnu.org/cgit/bash.git/tree/), and the func

Re: Use of `mktemp' is dangerous, better use `mkstemp'...

2021-01-17 Thread Ángel
On 2021-01-17 at 15:33 -0500, Chet Ramey wrote: > On 1/15/21 4:00 PM, Ángel wrote: > > On 2021-01-15 at 10:00 -0500, Chet Ramey wrote: > > > On 1/14/21 11:45 PM, Jeffrey Walton wrote: > > > > Hi Everyone, > > > > > > > > I

Re: Use of `mktemp' is dangerous, better use `mkstemp'...

2021-01-18 Thread Ángel
On 2021-01-18 at 14:05 -0500, Chet Ramey wrote: > On 1/17/21 7:46 PM, Ángel wrote: > > > > > [Explanation of when is mktemp() used and patch to remove the > > > > warning] > > > > > > The warning can be ignored. > > > > Sure. Howeve

Re: Feature Request: scanf-like parsing

2021-01-22 Thread Ángel
On 2021-01-23 at 00:47 +0700, pepa65 wrote: > It is otherwise very hard to get command output into a variable > without a subshell. > > Peter Why do you want to avoid the subshell? Do you want to modify some variables there visible to the parent, or is it just for efficiency ?

Re: Bash is incorrectly and inconsistently expanding tilde in $PATH

2017-05-04 Thread Ángel
On 2017-05-04 at 10:11 -0500, Eduardo Bustamante wrote: > On Thu, May 4, 2017 at 10:01 AM, Greg Wooledge wrote: > [...] > > Without taking a side on whether this is a security bug in bash, I will > > support the idea that users who put ~/bin (or similar) in PATH should > > be educated to make sure

Re: unalias works weirdly inside an if-then block

2017-05-18 Thread Ángel
I'm afraid you will have to rewrite the function just to get this slightly different result (maybe you can source again that section of the file?) :/

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: [PATCH] Correct error message when using -n and -o ignoreeof in interactive mode

2024-08-19 Thread Ángel
On 2024-08-18 at 11:21 +0700, Robert Elz wrote: > Interactive shells with -n (noexec) set are pointless The man page states: > -n Read commands but do not execute them. This may be used > to check a shell script for syntax errors. This is ig‐ >

Re: DKIM Signature Issue Causing Mailing List Posts to be Marked as Spam

2025-02-08 Thread Ángel
On 2025-02-03 at 19:00 -0500, Zeffie wrote: > I wanted to bring to your attention that the bash-bug mailing list > messages are being marked as spam by our spam filtering. The debug > headers indicate an "Invalid DKIM signature" which appears to be > causing the posts to be flagged. As you hav

[PATCH] Fix time(1) garbage output when time goes backwards.

2014-07-28 Thread Ángel González
libfaketime allows for easy testing of this bug: LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 FAKETIME='-1y' \ FAKETIME_START_AFTER_SECONDS=1 TIMEFORMAT=%lR /bin/bash -c 'time sleep 2' --- execute_cmd.c| 24 lib/sh/timeval.c | 5 - 2 files changed, 20 insertions

[PATCH] Fix time(1) garbage output when time goes backwards.

2014-07-28 Thread Ángel González
libfaketime allows for easy testing of this bug: LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 FAKETIME='-1y' \ FAKETIME_START_AFTER_SECONDS=1 TIMEFORMAT=%lR /bin/bash -c 'time sleep 2' --- execute_cmd.c| 24 lib/sh/timeval.c | 5 - 2 files changed, 20 insertions

Re: in error messages, do not output raw non-printable characters to the terminal

2014-09-10 Thread Ángel González
Steve Simmons wrote: > > IMHO, in this case, bash should do like zsh, which replaces the CR > > character by the character sequence "^M". > > This doesn't seem like a good idea. At our site it leads our zsh users > to send us complaints that they don't have a file with the two-character > name ^M.

Re: Bash-4.3 Official Patch 25

2014-09-24 Thread Ángel González
Eric Blake wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1141597 describes this bug > (aka CVE-2014-6271), and points out that even _with_ this patch, there > is still a flaw that attackers can use to overwrite portions of the > filesystem, which is also a possible exploitation avenue: > >

Re: Issues with exported functions

2014-09-25 Thread Ángel González
Steve Simmons wrote: > ..bash_once defines SET_ONCE and loads literally hundreds of environment > variables and exports many shell functions that would otherwise have to be > defined in .bashrc and processed on every freaking run. .bash_once is about > 50 times larger than .bashrc and .bash_logi

wrong logical evaluation of expressions involving true or false commands

2007-06-25 Thread Miguel Ángel
Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='p$ uname output: Linux hal 2.6.20-16-generic #2 SM

Re: wrong logical evaluation of expressions involving true or false commands

2007-06-26 Thread Miguel Ángel
Thank's a lot, Bob & Stephane. Very instructive your info. Sorry for my misinformation. Regards. -- sLap ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: Issues with exported functions

2014-09-25 Thread Ángel González
Chet Ramey wrote: > On 9/25/14, 2:47 PM, lolilolicon wrote: > > On Fri, Sep 26, 2014 at 2:28 AM, Ángel González wrote: > > [...] > >> On the other hand, this approach would be much more interesting if bash > >> delayed parsing of exported functions until they are

Re: REGRESSION: shellshock patch rejects valid function names

2014-09-26 Thread Ángel González
Eric Blake wrote: > At any rate, this seems like an inadvertent regression that could be > patched; are you willing to propose such a patch? The gist of the > matter is that the code base must use the same decision on what forms a > valid function name as it does in deciding what exported non-vari

Re: Issues with exported functions

2014-09-28 Thread Ángel González
David A. Wheeler wrote: > 2. Import environment variables *ONLY* when they are requested; do *NOT* > import them by default. Christos Zoulas has proposed this. This *IS* a real > backwards-incompatible change. But most users do *NOT* use this > functionality, and increasingly downstream syste

Re: Bash-4.3 Official Patch 27

2014-09-28 Thread Ángel González
The change only affects environment variables **loaded as exported functions**. Bash won't forbid you from using / inside the name of an environment variables. You can easily confirm with: > env -i 'foo/bar=baz' bash -c env Best regards

Re: Issues with exported functions

2014-09-29 Thread Ángel González
Chet Ramey wrote: > On 9/28/14, 12:31 PM, Ángel González wrote: > > > There's also the middleground of not parsing the environment variables > > before they are going to be used. That avoids the issues caused by > > parsing what is not needed *and* doesn't brea

Re: Patch file bash42-049 is broken

2014-09-29 Thread Ángel González
Deron Meranda wrote: > On an unrelated note, I have also tried to compare sources against the > Savannah Git repository, and I noted that the repository has a couple small > differences from the FTP files + patches. > > The Git repo has a blank file called "-i", probably an accident of some > comm

Re: Issues with exported functions

2014-09-29 Thread Ángel González
On Eric Blake wrote: > On 09/28/2014 10:31 AM, Ángel González wrote: > > David A. Wheeler wrote: > >> 2. Import environment variables *ONLY* when they are requested; do *NOT* > >> import them by default. Christos Zoulas has proposed this. This *IS* a > >>

Re: Bash-4.3 Official Patch 27

2014-09-29 Thread Ángel González
Linda Walsh wrote: > wrote: > > The change only affects environment variables **loaded as exported > > functions**. Bash won't forbid you from using / inside the name of an > > environment variables. > > > > The below doesn't demonstrate bash doing anything with the variable you > decla

Re: hashlib.c add NULL check for "string" parameter

2014-09-30 Thread Ángel González
Notes Jonny wrote: > On Mon, Sep 29, 2014 at 2:04 PM, Chet Ramey wrote: > > On 9/29/14, 8:22 AM, Notes Jonny wrote: > >> Hello > >> I noticed hash_search() did not check if "string" parameter was > >> non-NULL. Please find attached a patch for this. > > > > It's the caller's responsibility to ensu

Re: Bash-4.3 Official Patch 30

2014-10-07 Thread Ángel González
Chet Ramey wrote: > On 10/6/14, 6:16 PM, John E. Malmberg wrote: > > >>> Do you mean return ""; ? > >> > >> Yes, good catch. It doesn't make a difference: clang and gcc both accept > >> it as written and it behaves as desired. However, I'll change it for the > >> next version. > > > > Changing

Re: locale-dependent token separator handling doesn't work in multi-byte locales

2014-10-08 Thread Ángel González
Eric Blake wrote: > On 10/08/2014 08:52 AM, Stephane Chazelas wrote: > > When bash parses code it honours the "blank" character class in > > the current locale as token separator. > > > > For instance, if "x" is a blank character in the current locale, > > Such a locale is invalid per POSIX; but

Re: [RFC] Logically composable variant of errexit

2014-10-09 Thread Ángel González
Andreas Grünbacher wrote: > Hi all, > > the errexit option can be very useful in simple scripts. This option > is being ignored in many contexts like lists and conditionals though. > I understand that this is "by design" and that errexit cannot be > "fixed" to behave more reasonably. Still, this m

Re: [RFC] Logically composable variant of errexit

2014-10-10 Thread Ángel González
On Andreas Grünbacher wrote: > With errexit, you get vastly different results from functions depending > on how the functions are called, for example, > >foo() { > echo "foo: top" > false > echo "foo: bottom" >} > >set -o errexit > ># bottom of foo reached: >

Re: Odd bash behaviour with time:

2014-11-03 Thread Ángel González
Piotr Grzybowski wrote: > Hi Chet, hi all. > > based on what you say, and some comments in parse.y ;-) isn't the > below patch enough to get rid of the parser error for "time;echo;" > case? > > diff --git a/parse.y b/parse.y > index 815db98..766f258 100644 > --- a/parse.y > +++ b/parse.y > @@ -1

Re: bash 4.3: "Clear Scrollback and Reset" (Ctrl-Shift-X) in konsole stopped to work as expected when upgrading from upstream bash 4.2 to upstream bash 4.3

2014-11-28 Thread Ángel González
Doesn't seem like a bug to me. You asked your terminal emulator to clear the screen. It did so. Now you complain that it's "too clean" :) I understand how it may look confusing, but I don't think the term has much option here. Suppose that instead of the shell, you were executing something else (e

Re: Re[2]: bash 4.3: "Clear Scrollback and Reset" (Ctrl-Shift-X) in konsole stopped to work as expected when upgrading from upstream bash 4.2 to upstream bash 4.3

2014-11-30 Thread Ángel González
Askar Safin wrote: > > Please stop mischaracterizing the issue. It's not a bug: it's a case of > > konsole's mismatched expectations. Since the mechanism it uses is not > > documented, and relies on something in readline that is not documented, it > > can't fairly be called a bug. > Should long t

Re: bug with multiline strings parsing and single-quoted !

2014-12-02 Thread Ángel González
gennady.kupava wrote: > This looks like a bug: > > gena@note2:~$ echo "a > > b" | echo '!' > bash: !': event not found > > ^C > gena@note2:~$ > > Is it? > > Gennady IMHO it is. Confirmed in 4.3.30

Re: [PATCH] added -- in autocd

2015-04-28 Thread Ángel González
On Tue, 2015-04-28 at 21:27 +0200, isabella parakiss wrote: > I'm sorry, I added a link to a pastebin in my previous message but > it's not available anymore. > Anyway, this was the content (posted by Score_Under in #bash): > > I think -- should enter said directory. > I hope it's ok... It may

Re: -e does not take effects in subshell

2015-08-21 Thread Ángel González
On jue, 20-08-2015 a las 17:38 -0700, Linda Walsh wrote: > Functions are a collection of many commands. They are not a single, > simple statement. I remember using their return value in some cases. > > With the change, I couldn't run a func and have it return the > value in $? (1 byte, I know) -

Re: In the bash man page the entry for the 'read' command has two spaces after it instead of one.

2015-08-21 Thread Ángel González
On Andreas Schwab wrote: > Try searching for '^ {7}read ' instead. There are commands that > aren't followed by options in the description. entering «/^ *read⤶» may be easier to type (and remember)

Re: In the bash man page the entry for the 'read' command has two spaces after it instead of one.

2015-08-22 Thread Ángel González
Andreas Schwab wrote: > Bob Proulx writes: > > > Andreas Schwab wrote: > > > Ángel González writes: > > > > entering «/^ *read⤶» may be easier to type (and remember) > > > > > > It won't match, though. > > > > It matches f

Re: Please take a look at this bug

2015-08-23 Thread Ángel González
Mostafa Nazari wrote: > bug_part <(echo "TEST") The <(echo "TEST") construct creates a pipe. You can view it just printing the value that gets passed to the program: $ echo <(echo "TEST") /dev/fd/63 Now, a problem of that pipe is that the contents can only be read once. Indeed, what would the sec

Re: Why does a Bash shell script write prompts followed by reads and do it right?

2015-09-02 Thread Ángel González
Robert Parker wrote: > Yet when I attempt the same in a C program, the system always writes > 2 prompts, then waits for a read. > Does not matter if I write(1, "..."); read(0, number, buffer); or use > fputs("...", stdout); fgets(. > The result is the same. > And I have tried using readline wit

Re: Proposed Prompt Escapes

2015-11-17 Thread Ángel González
While we are talking about new prompt escapes, I would love to be able to put in the prompt escapes elapsed time values from the previous command, so prefixing with time(1) could be redundant (if the intended resource was provided as an escape). Regards

Re: Proposed Prompt Escapes

2015-11-18 Thread Ángel González
Dennis Williamson wrote: > Do you mean something like: > > PS1='$SECONDS ' Not exactly. $SECONDS is the number of seconds since the shell was started. I am interested in the seconds elapsed by the last command. It is a hacky solution, but it could be done with: > PS1=''; PROMPT_COMMAND='printf "

Re: Apparmor problemas

2015-12-09 Thread Ángel González
Hello heliogabalo It doesn't seem your problem is really related to bash but rather with apparmor and the other application you are running. Hola helogabalo, me parece que tu problema no tiene relación con bash, sino con apparmor y el programa que estás intentando ejecutar. Greets

  1   2   >