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

2023-09-07 Thread Eric Blake
On Thu, Sep 07, 2023 at 02:42:16PM +0700, Robert Elz wrote: > Date:Wed, 6 Sep 2023 11:32:32 -0500 > From: Eric Blake > Message-ID: > > > | You (anyone reading this, not just kre) are welcome to join tomorrow's > | Austin Group meetin

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

2023-09-07 Thread Eric Blake
er (useful) conversion specifier in C. And given that, I prefer naming such an extension option -C or -c (implying C-like), rather than your suggestion of -b (implying binary, but where the implication only benefits %b) as a better option name for such a printf extension option. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

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

2023-09-06 Thread Eric Blake
r than what existing practice has. Coreutils is willing to do it, but I have not actually committed that patch yet, waiting to see how this thread pans out. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

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

2023-09-06 Thread Eric Blake
to mean "interpret my format string according to C23 semantics" is also a viable idea, but one not mentioned in the current incantation of the Austin Group bug. But that's why the bug has a 30-day review period, to collect feedback comments on how it can be better worded before Issue 8 is finalized. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

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

2023-09-01 Thread Eric Blake
g that if implementations are willing to implement it now, it will make Issue 9 easier to reason about. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org

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

2023-09-01 Thread Eric Blake
On Fri, Sep 01, 2023 at 08:59:19AM +0100, Stephane Chazelas wrote: > 2023-08-31 15:02:22 -0500, Eric Blake via austin-group-l at The Open Group: > [...] > > The current POSIX says that %b was added so that on a non-XSI > > system, you could do: > > > >

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

2023-08-31 Thread Eric Blake
On Thu, Aug 31, 2023 at 04:01:17PM -0500, Rob Landley wrote: > On 8/31/23 13:31, Eric Blake wrote: > > POSIX Issue 8 will be obsoleting %b (escape sequence interpolation) so > > that future Issue 9 can change to having %b (binary literal output) > > that aligns with C2x. >

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

2023-08-31 Thread Eric Blake
On Thu, Aug 31, 2023 at 03:10:58PM -0400, Chet Ramey wrote: > On 8/31/23 11:35 AM, Eric Blake wrote: > > In today's Austin Group call, we discussed the fact that printf(1) has > > mandated behavior for %b (escape sequence processing similar to XSI > > echo) that will even

RFC: changing printf(1) behavior on %b

2023-08-31 Thread Eric Blake
ynonym for %b is probably going to be easier (less shell escaping needed). Is there any interest in a patch to coreutils or bash that would add such a synonym, to make it easier to leave that functionality in place for POSIX Issue 9 even when %b is repurposed to align with C2x? -- Eric Blake, Pr

Re: I've found a vulnerability in bash

2021-11-19 Thread Eric Blake
x55d3099d69d0 /* 72 vars */) = 0 /home/eblake [pid 1248831] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1248831, si_uid=14986, si_status=0, si_utime=0, si_stime=0} --- +++ exited with 0 +++ According to POSIX, perl should REALLY be passing a "--" argument between "-c" and the scalar string given by the user; see https://www.austingroupbugs.net/view.php?id=1440 -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: [Patch] .gitignore TAGS and tags

2021-03-15 Thread Eric Blake
rawback of not having these in the repo and not in .gitignore >> is that a 'git status' complains about untracked files. > > OK, this is a good reason. But even if the upstream repo doesn't want to ignore a file in the (checked-in) .gitignore, you can always edit your (local-

Re: echo builtin doesn't handle end-of-options flag

2020-08-16 Thread Eric Blake
ally set it; whereas using printf is reliably portable. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org

Re: echo builtin doesn't handle end-of-options flag

2020-08-16 Thread Eric Blake
ined. echo -- "-n foo" # -- -n foo Also well-defined. I see nothing in your report about bash disobeying POSIX, but rather confusion on your part about what POSIX actually requires. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org

Re: [PATCH] Define $as_echo and $as_echo_n for backward compatibility.

2020-03-13 Thread Eric Blake
On 3/13/20 2:22 PM, Zack Weinberg wrote: On Fri, Mar 13, 2020 at 3:13 PM Eric Blake wrote: Unpatched bash 5.0 has a bug where calling $as_echo that contains \ can result in unintended globbing, where the behavior of the expansion is dependent on the contents of the current directory. Nasty

Re: Performance bug of {1..1000000}?

2020-03-09 Thread Eric Blake
sions like that, when it is already more efficient to use other means of iteration that do not require bash to keep the entire sequence in memory. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org

Re: Backslash missing in brace expansion

2019-12-06 Thread Eric Blake
efore any of the POSIX word expansions, and is logically a separate step. Then that argues that {Z..a} should produce \\ and \', rather than bare characters, so that the subsequent quote removal gets back to the intended character. -- Eric Blake, Principal Software Engineer Red Hat, Inc.

Re: Backslash missing in brace expansion

2019-12-06 Thread Eric Blake
from the unquoted backslash. Yes - sure. But then I'm wondering why the unquoted backtick doesn't start command substitution: It may be version dependent: $ echo ${BASH_VERSINFO[@]} 5 0 7 1 release x86_64-redhat-linux-gnu $ echo b{Z..a}d bash: bad substitution: no closing "`"

[PATCH] docs: More hints on #! parsing

2019-09-25 Thread Eric Blake
Just because Linux does not split whitespace on #! lines does not mean that all operating systems behave the same. Mention the recent coreutils 8.30 'env -S' addition for working around interpreter argument limitations, as well as the use of env to locate bash even when it is not in /bin. --- do

Re: Incorrect option processing in builtin printf(1)

2019-07-22 Thread Eric Blake
#x27; to output exactly '-x', by virtue of the fact that it mandates all utilities (other than special builtins) with the specification 'OPTIONS None.' to parse and ignore '--' as the end of options, whether or not the utility takes options as an extension. If NetBSD broke t

Re: Incorrect option processing in builtin printf(1)

2019-07-22 Thread Eric Blake
Bash happens to have extension options, so your command line is not portable, and it is not a bug in bash. > Please, let's try to avoid losing control of printf like what > happened to echo, stick to the requirements of POSIX where they > apply and actually sp

Re: issues in bash found while creating command result display

2019-04-16 Thread Eric Blake
on allows an easy distinction between normal exit with 8-bit status and exit due to signal. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature

Re: Segfault after many stackframes

2019-04-12 Thread Eric Blake
handlers for SEGV operating sanely when there is not stack overflow. So in the meantime, the core dump is the best you'll get. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature

Re: [A-Z], [:upper:]

2019-03-28 Thread Eric Blake
e are confused by the locale-specific nature of ranges otherwise). > > Repeat-By: > foo=ABC ; echo ${foo%[A-Z]} ${foo%[:upper:]} If you want [[:upper:]] to work, you have to spell it correctly. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualizati

Re: Fix compilation on Solaris 10

2019-02-28 Thread Eric Blake
ght be interrupting the window between open() and fcntl(). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org

Re: why not update bash syntax while maintaining backwards compatibility?

2019-02-15 Thread Eric Blake
nefits > of more lenient syntax. What are your thoughts? Bad idea. Existing scripts can do: echo = hi and your proposal would change the semantics of that line from outputting the string "= hi" to instead assigning to the variable named $echo. -- Eric Blake, Principal Software Engine

Re: About ARITH_CMD

2019-02-14 Thread Eric Blake
rates. The above quotes from POSIX demonstrate ambiguous situations where lexical analysis, rather than parsing alone, is needed to decide between arithmetic or command substitution; so since we are already relegated to a lexical decision, complicating the parser isn't going to buy us any benefit. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature

Re: Why { is parsed differently depending on the context?

2019-02-14 Thread Eric Blake
html#tag_18_10 may be a helpful read for rules on deciding whether a TOKEN is further resolved into reserved word or a plain WORD (although remember that bash's parser recognizes more things than are required by the POSIX grammar) -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature

Re: What is the purpose of wdcache and wlcache?

2019-02-08 Thread Eric Blake
f unknown lengths, the cache at least lets us avoid even more malloc()s of the fixed-size management data structures. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature

Re: What is the purpose of parser-built?

2019-02-06 Thread Eric Blake
On 2/6/19 5:05 PM, Peng Yu wrote: > On Wed, Feb 6, 2019 at 4:49 PM Eric Blake wrote: >> >> On 2/6/19 4:18 PM, Peng Yu wrote: >>> Hi, >>> >>> I deleted the file parser-built, and bash still compiles and an empty >>> parser-built file will be gen

Re: Where is yacc_EOF defined?

2019-02-06 Thread Eric Blake
ber]]... So, the %left line that you quoted above IS what defined yacc_EOF to be a token. If you've never used yacc/bison before, trying to learn how they work by using bash as your starting point is a rather heavy crash-course. -- Eric Blake, Principal Software Engineer Red Hat, Inc.

Re: What is the purpose of parser-built?

2019-02-06 Thread Eric Blake
ave you do all the work for me". http://www.catb.org/esr/faqs/smart-questions.html is a great read; it will teach you how to come across as someone worth chatting to, rather than an infinite time sink, if you would use the advice in that file to ask smarter questions. -- Eric Blake, Principal Software E

Re: ${p+\"$p\"}

2019-01-22 Thread Eric Blake
For more details: http://austingroupbugs.net/view.php?id=221 -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature

Re: Where is GLOBAL_COMMAND?

2019-01-22 Thread Eric Blake
f distributed version control. Nothing is preventing you from creating a github clone of the savannah upstream git repository, and making your patches in whatever way you prefer using github's processes; the only real leap is realizing that you submit your patches as emails to this list rather than a

Re: Where is GLOBAL_COMMAND?

2019-01-22 Thread Eric Blake
t. If you think the existing convention is confusing, then submit a patch to change it instead of asking someone else to take on the grunt work. Otherwise, learn to live with the existing convention (which doesn't bother me, so I won't be submitting a patch). -- Eric Blake, P

Re: Maximum length of variable name

2018-11-15 Thread Eric Blake
On 11/15/18 12:00 PM, RAL wrote: Hi, How is defined the maximum number of characters a variable name can have? Bash has no hardcoded limit, thus your maximum is dependent on how much free memory your system has. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301

Re: built-in '[' and '/usr/bin/[' yield different results

2018-11-13 Thread Eric Blake
ause your /bin/sh is not bash, but probably dash, and dash has picked a missing file as being treated as always an error. That does not make it a bug in bash, though, but a difference in behavior of your /bin/sh. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: exiting noninteractive shells on 'shift 2'

2018-11-09 Thread Eric Blake
o is to turn on the shift_verbose option in posix mode. Cool - I didn't realize we already had a shopt for that. Yes, it sounds like in POSIX mode, shift_verbose should be turned on. On a related note, should turning on POSIX mode also auto-enable xpg_echo? -- Eric Blake, Principal Softw

Re: exiting noninteractive shells on 'shift 2'

2018-11-09 Thread Eric Blake
On 11/9/18 8:52 AM, Chet Ramey wrote: On 11/9/18 9:47 AM, Eric Blake wrote: Well, there's STILL a conformance issue - the standard requires that unless documented otherwise, any time a command line tool exits with non-zero status, that it outputs a message to stderr explaining the

Re: exiting noninteractive shells on 'shift 2'

2018-11-09 Thread Eric Blake
On 11/8/18 6:03 PM, Chet Ramey wrote: On 11/8/18 3:37 PM, Eric Blake wrote: If I'm reading POSIX correctly, shift is a special built-in utility, and if '$#' is 0 or 1, then 'shift 2' counts as a utility error that shall exit the shell, per the table in 2.8.1 Consequenc

exiting noninteractive shells on 'shift 2'

2018-11-08 Thread Eric Blake
r is greater than "$#", this may be considered a syntax error and a non-interactive shell may exit; if the shell does not exit in this case, a non-zero exit status shall be returned. Otherwise, zero shall be returned. Tested on Fedora 28 with bash-4.4.23-1.fc28.x86_64 -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: built-in regex matches wrong character

2018-09-06 Thread Eric Blake
On 09/06/2018 12:39 PM, Aharon Robbins wrote: In article , Eric Blake wrote: But bash could be taught to convert any regex that contains a range with both endpoints ASCII into a different bracket expression before handing things over to regcomp(). That is, if the user is matching against [a

Re: built-in regex matches wrong character

2018-09-06 Thread Eric Blake
On 09/06/2018 09:17 AM, Chet Ramey wrote: On 9/5/18 4:39 PM, Eric Blake wrote: Or, you can use bash's 'shopt -s globasciiranges' which is supposed to enable Rational Range Interpretation, where even in non-C locales, a character range bounded by two ASCII characters takes

Re: built-in regex matches wrong character

2018-09-05 Thread Eric Blake
locale definition of only the ASCII characters in that range, rather than the locale's definition of whatever other characters might also be equivalent (actually, while I know that shopt affects globbing, I don't know if it also affects regex matching - but if it doesn't, that's probably a bug that should be fixed). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: Rational Range Interpretation for bash-5.0?

2018-08-06 Thread Eric Blake
other GNU utilities have done it for some time. What do folks think? I'm in favor of the idea. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: [PATCH] Fix null environ crash in getenv() provided by lib/sh/getenv.c

2018-07-24 Thread Eric Blake
tml https://cygwin.com/ml/cygwin/2018-05/msg00334.html -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: -- paramter does not work in bash 4.4

2018-07-02 Thread Eric Blake
ssing operand Try 'dirname --help' for more information. $ dirname -- -- . So, with that said, do you have an example command line that you are still confused about, rather than a vague non-report? -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: Bash patches format

2018-05-31 Thread Eric Blake
Makes no real difference to me on the Cygwin port. -p1 is slightly nicer, but it's a scripted solution to apply patches, and very easy to tweak the script to match whatever the patches look like. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtu

Re: why is dash confused with underscore in autocompletion?

2018-05-29 Thread Eric Blake
ignore-case' as the two knobs used to fine-tune whether you are doing case-insensitive completion, and if so, whether -/_ are part of that case-insensitivity. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: readline-8.0-alpha: Makefile.in: don't forget to create pkgconfigdir

2018-05-24 Thread Eric Blake
On 05/24/2018 01:29 PM, Eric Blake wrote: On 05/24/2018 01:18 PM, Chet Ramey wrote: On 5/24/18 11:40 AM, gabriele balducci wrote: hi just tried to build/install readline-8.0-alpha and found the following glitch: Thanks for the report. I think a better fix is to not to attempt to install

Re: readline-8.0-alpha: Makefile.in: don't forget to create pkgconfigdir

2018-05-24 Thread Eric Blake
l the pieces that weren't installed the first time). -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: important bug

2018-03-28 Thread Eric Blake
o. So back to the overall expression: if pipeline2 has non-zero status, then pipeline3 is run, even though that is the echo statement you incorrectly surmised would never display. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org

Re: add generated files to .gitignore

2018-02-24 Thread Eric Blake
se files aren't ever pushed to the bash git repositories (master, devel). If Chet doesn't want to patch the primary bash.git to ignore them for everybody in .gitignore, you can still patch your downstream repo to ignore them locally by instead adding those exclusions to .git/info/excl

Re: Bug in [ -d ... ] ?

2017-11-02 Thread Eric Blake
ase on Scientific Linux 7 and it happens with the latest > release on both. Are you sure you tested correctly? test has always behaved differently for one argument than for two. At any rate, this is not a bug in bash, but more likely in your script. -- Eric Blake, Principal Software Engineer Re

Re: env does not wrap variables that contain semicolon in quotes

2017-10-20 Thread Eric Blake
have a new output format specifically designed for reinterpretation in shell (certainly 'env' and 'env -0' output is not designed for that). Maybe adding 'env -p' (analagous to -p in various bash builtins) is a worthwhile feature addition for upstream coreutils, but ag

Re: [BUG] Bash segfaults on an infinitely recursive funcion (resend)

2017-09-25 Thread Eric Blake
ything unsafe. If you think you can make bash gracefully handle ALL possible bad inputs WITHOUT exiting or going into an infloop itself, then you are claiming that you have solved the Halting Problem, which any good computer scientist already knows has been proven to be undecidable. -- Eric Blake,

Re: aliases not supported by default in non-interactive mode...but POSIX required?

2017-08-24 Thread Eric Blake
uoted*glob"', are so gross that I can only point you to the web page discussing how gross they are: https://www.chiark.greenend.org.uk/~sgtatham/aliases.html -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org signature.asc Description: OpenPGP digital signature

Re: extension of file-test primitives?

2017-08-23 Thread Eric Blake
e posix standard. Not just deprecated, but inherently ambiguous. There are situations where you CANNOT tell whether the user meant -a to mean the binary operator or a string being tested against, because POSIX (intentionally) does not specify enough precedence rules in how to parse > 4 arguments.

Re: Very minor fixes thanks to cppcheck

2017-06-05 Thread Eric Blake
thing. Of > course, I give the copyright to the FSF. Copyright assignment is more formal than that, if your patch is deemed significant (small patches can be taken without assignment, but large patches require actual paperwork and signatures, although these days there are various countries wh

Re: [ANNOUNCEMENT] Updated: libreadline7-7.0.3-3

2017-05-15 Thread Eric Blake
On 04/14/2017 11:33 PM, Steven Penny wrote: > On Thu, 13 Apr 2017 13:48:04, Eric Blake wrote: Sorry for my delay in noticing this. >> Is it still a problem with pselect, where rebuilding with the same >> configuration as 7.0.1-2 fixes things? I'm really not sure how to even &

Re: Bug: different behavior between "jobs -l" and "builtin jobs -l"

2017-03-21 Thread Eric Blake
bug specifically mentions 'trap', and concludes that a separate bug may need to be opened (which I could not find) giving the same treatment to 'jobs'. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: "unset var" pops var off variable stack instead of unsetting it

2017-03-20 Thread Eric Blake
o make all shells with 'local' to settle on a lowest common denominator). -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

default PS1 is not POSIX-compliant?

2017-03-03 Thread Eric Blake
it is easier to patch 'bash --posix' to use a shorter prompt than it is to fix the POSIX wording, then that may be the course to take. Also, the bash behavior of modifying PS4 during subshells does not match what other shells do. -- Eric Blake eblake redhat com+1-919-301-3266 Libv

Re: Does bash treat segment fault causing by scripts as security bugs ?

2017-02-15 Thread Eric Blake
ode without you being able to prevent it. Shellshock was a case where bash could execute code before your script began (hence a CVE), but infinite recursion is a case where avoiding your script avoids the crash (therefore the bug is your script, not bash, and not worth a CVE). -- Eric Blake eb

Re: echo -n

2017-02-02 Thread Eric Blake
trings using 'echo'. Use 'printf' instead. POSIX even tells you to do that. > Please let us know if this a bug or do we have any other option to print > -n ? Not a bug. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvi

Re: set command overrides my ARGV array

2016-12-27 Thread Eric Blake
yntax. 'set -o pipefail' turns it on, 'set +o pipefail' turns it off 'set -o pipefail on' is the same as 'set -o pipefail; set on', which turns it on but also changes $*. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Not operator (~) fail on arithmetic expansion.

2016-11-28 Thread Eric Blake
en begin with a number? Sadly, yes. In fact, username '0' need not have uid '0'. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [PATCH] Add-rm-rf-as-examples-loadables-rm.c

2016-11-01 Thread Eric Blake
imply didn't know how > to do that in an acceptable manner (within a loadable bash builtin). This > should be done for other loadables as well (e.g. 'cat'). It would serve it's > purpose as 'example' even better. Yes, this I can agree with - having a GOOD e

Re: [PATCH] Add-rm-rf-as-examples-loadables-rm.c

2016-10-31 Thread Eric Blake
y specifies the behavior of 'rm -f' without arguments; with 'rm', you can do what you want (therefore you comply with POSIX), but it's still nice to match what other implementations do. While I think that it is neat that this builtin can be used to speed up configure scripts, I don't think it is ready for prime time yet. It's tough to recommend that autoconf be taught to use this sub-standard implementation. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: bash history with mixed timestamps slow and broken

2016-09-26 Thread Eric Blake
allocation algorithm, where the size of the list is not known a priori, will use a geometric allocation growth mechanism (doubling the allocation size is easiest, but a 3/2 growth ratio also works; the point is that each growth is larger than the last, so that you get progressively more iterations

Re: Command substitution with null bytes generates warning

2016-09-19 Thread Eric Blake
n input > wooledg@wooledg:~$ x=$(< /proc/$$/cmdline 2>/dev/null) > wooledg@wooledg:~$ Or: $ x=$(< /proc/$$/cmdline tr -d \\0) -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: POSIX Bug

2016-08-26 Thread Eric Blake
ilable at all? We need some more context. An offer to help is nice, but without telling us what you think is buggy and needs fixing, it's kind of hard to know if your request to offer help is useful. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization lib

Re: read builtin ignores a byte after \r in bash-4.3-p42 in Cygwin

2016-08-05 Thread Eric Blake
On 08/05/2016 04:31 PM, Eric Blake wrote: > On 03/20/2016 11:49 AM, Chet Ramey wrote: >> On 3/20/16 12:54 AM, Жанна Целых wrote: >> >>> uname output: CYGWIN_NT-6.1 microsoft-win7 2.4.1(0.293/5/3) 2016-01-24 >>> 11:24 i686 Cygwin >>> Machine Type: i686-pc-

Re: read builtin ignores a byte after \r in bash-4.3-p42 in Cygwin

2016-08-05 Thread Eric Blake
t is desirable, it should only eat \r immediately before \n, not \r before other bytes. This may be stale leftover code from years ago that doesn't make sense to keep around. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Cannot grep jobs list when jobs called in a function

2016-04-28 Thread Eric Blake
n the SO question have also reported unusual results with > combinations on this theme. Am I misunderstanding some behavior of the jobs > built-in or functions? You're misunderstanding that jobs in a subshell are different than jobs in the parent, and the special-casing required to

Re: bash 4.4-rc1 EXECIGNORE not fully working?

2016-03-19 Thread Eric Blake
e it did), not whether bash will avoid executing it (and you proved that it is still executable). The main use for EXECIGNORE is for ignoring *.so or *.dll files, which must have executable permissions, but which you do not want polluting tab completion. So, without further details, I don't

Re: mv to a non-existent path now renames instead of failing

2016-03-19 Thread Eric Blake
On 03/17/2016 08:49 AM, Eric Blake wrote: >> Repeat-By: >> rmdir two 2> /dev/null >> mkdir one >> mv one two/ > > POSIX requires this to succeed, and renames 'one/' to 'two/'. That said, if you WANT an error if 'two/'

Re: bash 4.4-rc1 EXECIGNORE not fully working?

2016-03-19 Thread Eric Blake
On 03/18/2016 11:36 AM, Andreas Schwab wrote: > Eric Blake writes: > >> But I don't know whether bash is calling exec[lv] with a canonicalized >> name instead of exec[lv]p() with the kernel doing the lookup; > > PATH searching is a pure user-space concept. Fine.

Re: bash 4.4-rc1 EXECIGNORE not fully working?

2016-03-19 Thread Eric Blake
On 03/18/2016 10:35 AM, Greg Wooledge wrote: > On Fri, Mar 18, 2016 at 10:27:54AM -0600, Eric Blake wrote: >> What were you expecting to have happen? EXECIGNORE only controls >> whether a file matching the glob is excluded from tab completions (which >> it sounds like it d

Re: mv to a non-existent path now renames instead of failing

2016-03-19 Thread Eric Blake
opsis form is assumed when the final operand does not name an existing directory and is not a symbolic link referring to an existing directory." That sums up your situation ('two/' does not exist, so you are doing 'mv source target_file', not 'mv source target_dir'

Re: Security Vulnerability Reporting

2016-02-26 Thread Eric Blake
at which point we can confirm that it is not a security bug. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Add a mirror to github

2016-02-15 Thread Eric Blake
ing only free software without using github. In other words, if you DO add a github mirror, discussion of patches will still need to take place on this list, and not move to github. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.as

Re: bash closes fd twice.

2015-12-11 Thread Eric Blake
dler might open an fd and the signal can occur in the window between the two close()s. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: wrong prompt and cd to root

2015-11-07 Thread Eric Blake
POSIX requires that paths of // be preserved literally, because it has implementation-defined semantics. If you are using a Linux kernel, // is implementation-defined as a synonym for /, but on other platforms, such as Cygwin, // is a distinct location (the root of //machine/share/path notation) f

Re: Paste with null delimiter

2015-11-03 Thread Eric Blake
plication. > > I'll give up, but if you want to post this consersation on the list fell > free to do it. > > I would like to thank you very much for your help and your time. > We're trying to help. If we haven't answered your question yet, then feel

Re: Paste with null delimiter

2015-11-03 Thread Eric Blake
uot;odd", "even"] - once the quotes are stripped, you are still left with an empty argument, but only if those quotes that were trying to delineate an empty string weren't adjacent to anything else. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Paste with null delimiter

2015-11-03 Thread Eric Blake
any other myriad of patterns where the quotes are stripped. The ONLY way to pass an empty string argument to a short option is to do it as a separate argument, because the quotes are already stripped by the time argv is formed. Thus, the space is essential. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Paste with null delimiter

2015-11-03 Thread Eric Blake
ent to: paste -dodd even which is NOT the same as the NUL delimiter as the argument to -d. There is no way to specify an empty string as the option to a short option, except as a separate parameter. This is not a bug in bash, but in your usage. -- Eric Blake eblake redhat com+1-919

Re: a few unintended translations of command names

2015-11-02 Thread Eric Blake
(void) { return _(foo); /* And _() here won't add anything to the .pot, because its argument was not a literal "string" */ } If you don't want something translated, then don't wrap it in either _() or N_(). -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: command substitution is stripping set -e from options

2015-10-01 Thread Eric Blake
x27;t expect it to. > > It *seems* to work with only a single command, because the return > value of the assignment is the last command executed inside the > command substitution. But if there are multiple commands, or a > function call, errors are not caught. What's w

[PATCH] input: fix logic bug that breaks on O_TEXT systems

2015-09-24 Thread Eric Blake
;\r\n' into logical '\n'). But it introduced a typo, using O_TEXT where it meant to use B_TEXT, with the result that scripts read in text mode would seek to the wrong location. Thanks to Jeff Downs for helping me find the typo. Signed-off-by: Eric Blake --- input.c | 2 +- 1 file

Re: '[ --version' should give output, instead a bash error missing re: missing ']'

2015-09-22 Thread Eric Blake
ins instead of the coreutils versions, then the behavior you see is expected and not a bug. To see the behavior mentioned in the coreutils man page, be sure you run the coreutils version of [, as in: env [ --help or /bin/[ --help -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualizati

Re: local keyword hides return code of command substitution

2015-09-22 Thread Eric Blake
rst, > then do the command substitution assignment on another line and > check the return code there. That is not a workaround, so much as the correct behavior. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: \c-handling in $'-strings

2015-09-02 Thread Eric Blake
t what people can start implementing now, even before POSIX finally makes it official. And this very issue has just been under some recent revisions; comment 2793 mentions that some wording revisions were proposed just last month. -- Eric Blake eblake redhat com+1-919-301-3266 Lib

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

2015-09-02 Thread Eric Blake
; Obviously you > meant to flush stdout. And in the code snippet shown here, this observation is certainly correct. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Function name conflict with alias in bash-4.3

2015-08-25 Thread Eric Blake
n of a parse), you have just (re-)discovered one of the reasons why we strongly recommend the use of functions rather than aliases in the majority of modern code. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [ PATCH 1/1 ] l10n: zh_{CN,TW} localization update for bash 4.3

2015-08-21 Thread Eric Blake
database is better, but then they should have _replaced_ the upstream line rather than _removing_ it. I'm filing a downstream bug. https://bugzilla.redhat.com/show_bug.cgi?id=1255886 -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [ PATCH 1/1 ] l10n: zh_{CN,TW} localization update for bash 4.3

2015-08-21 Thread Eric Blake
On 08/21/2015 08:22 AM, Chet Ramey wrote: > On 8/21/15 10:06 AM, Eric Blake wrote: > >> GNU Coding Standards recommend that '$program --help' should list the >> preferred bug-reporting address, and that the corresponding .po file >> should then expand that info

Re: [ PATCH 1/1 ] l10n: zh_{CN,TW} localization update for bash 4.3

2015-08-21 Thread Eric Blake
Unfortunately, 'bash --help' violates this rule in the original English. But .po writers could STILL at least add their preferred translation-bug reporting address into bash's (incomplete) --help output. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Integer Overflow in braces

2015-08-18 Thread Eric Blake
our script to not do stupid things, like trying an insanely-large brace expansion, or trying an 'eval' (or similar) on untrusted user input. But don't call it a bash security hole that bash allows you to write stupid scripts. -- Eric Blake eblake redhat com+1-919-301-3266 Libv

Re: -e does not take effects in subshell

2015-08-12 Thread Eric Blake
ior standardized by POSIX. It is NOT intuitive, and our advice is "DON'T USE set -e - IT WON'T DO WHAT YOU WANT". We can't change the behavior, because it would break scripts that rely on the POSIX-specified behavior. -- Eric Blake eblake redhat com+1-919-301-326

  1   2   3   4   5   6   7   >