Re: messy bash.git history

2015-02-09 Thread Eric Blake
On 02/09/2015 08:19 AM, Chet Ramey wrote: > On 2/6/15 4:13 PM, Eric Blake wrote: >> Chet, > >> I've noticed that your 'devel' branch in bash.git is rather messy; >> basically lots of commits that snapshot the state of a directory, then >> a followup

Re: Does [ -f FILE ] have a bug on testing a symlink ?

2015-02-09 Thread Eric Blake
&& echo true > true which means tmp/sym-link resolved to a regular file. You need test -h to determine if you have a symlink. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Strange file -i

2015-03-04 Thread Eric Blake
ash/2014-07/msg00075.html -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Bug in sh_backslash_quote function (bash 4.3.33)

2015-03-04 Thread Eric Blake
d char type: > if (backslash_table[(unsigned char)c] == 1) Similar to this other report: https://lists.gnu.org/archive/html/bug-bash/2015-01/msg00096.html and it looks like Chet has done some work in git at addressing various call sites, although I have not yet checked if he got them all. -- E

Source Code Bug in Bash-4.3.33 Module variables.c

2015-03-07 Thread Eric Robertson
573,7 +2573,7 @@ entry = make_new_array_variable (newname); /* indexed array by default */ if (entry == 0) return entry; - ind = array_expand_index (name, subp, sublen); + ind = array_expand_index (entry, subp, sublen); bind_array_element (entry, ind, value, aflags); } #endif Regards, Eric

Re: Experiment to provide a mirror of bash with detailed git history

2015-03-16 Thread Eric Blake
ry with cleaner history, even if you have to manually split Chet's weekly commits into what is hopefully saner chunks, seems nice, if you are willing to give it the effort. Sadly, I don't think I have enough free time to commit to helping in the effort. -- Eric Blake eblake red

Re: feature-request: don't count history time comment lines when in HISTFILESIZE

2015-03-26 Thread Eric Blake
hen the command contained newlines? -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: definite way to determine the running shell

2015-03-27 Thread Eric Blake
each feature that is not in common to all shells. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

[PATCH] build: fix build of variables.c

2015-04-17 Thread Eric Blake
ale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -DDEBUG -DMALLOC_DEBUG -I. -I. -I./include -I./lib -g -O2 -Wno-parentheses -Wno-format-security -c variables.c variables.c: In function ‘initialize_shell_variables’: variables.c:425:7: error: ‘else’ without a pr

[PATCH] build: fix build without MALLOC_STATS

2015-04-17 Thread Eric Blake
-lglob -lsh -lreadline -lhistory -ltermcap -ltilde -lmalloc-ldl shell.o: In function `sh_exit': /home/eblake/bash/shell.c:968: undefined reference to `trace_malloc_stats' * shell.c (sh_exit): Require MALLOC_STATS, not just MALLOC_DEBUG. Signed-off-by: Eric Blake --- Another fix that

Re: [PATCH] build: fix build of variables.c

2015-04-17 Thread Eric Blake
On 04/17/2015 11:01 AM, Chet Ramey wrote: > On 4/17/15 10:26 AM, Eric Blake wrote: >> gcc -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"' >> -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"x86_64-unknown-linux-gnu&

Re: [PATCH] build: fix build of variables.c

2015-04-17 Thread Eric Blake
On 04/17/2015 11:38 AM, Eric Blake wrote: > On 04/17/2015 11:01 AM, Chet Ramey wrote: >> On 4/17/15 10:26 AM, Eric Blake wrote: >>> gcc -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"' >>> -DCONF_OSTYPE='"linux-gn

Re: [PATCH] build: fix build without MALLOC_STATS

2015-04-17 Thread Eric Blake
On 04/17/2015 11:46 AM, Chet Ramey wrote: > On 4/17/15 10:47 AM, Eric Blake wrote: >> gcc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob >> -L./lib/tilde -L./lib/malloc -L./lib/sh -rdynamic -g -O2 -Wno-parentheses >> -Wno-format-security -o bash shell.o eva

Re: [PATCH] build: fix build of variables.c

2015-04-17 Thread Eric Blake
On 04/17/2015 11:42 AM, Eric Blake wrote: > On 04/17/2015 11:38 AM, Eric Blake wrote: >> On 04/17/2015 11:01 AM, Chet Ramey wrote: >>> On 4/17/15 10:26 AM, Eric Blake wrote: >>>> gcc -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"&#x

Re: messy bash.git history

2015-04-17 Thread Eric Blake
On 02/06/2015 02:13 PM, Eric Blake wrote: > Chet, > > I've noticed that your 'devel' branch in bash.git is rather messy; > basically lots of commits that snapshot the state of a directory, then a > followup commit that removes leftovers and stray files. If you were

[PATCH] Add EXECIGNORE

2015-04-17 Thread Eric Blake
to live in a separate location (/usr/lib{,64}/) from normal executables. But even on Linux, attempts to directly execute a .so file (other than the rare exception like /usr/lib/libc.so) usually results in spectacular failure, so this is useful to more than just Cygwin. Signed-off-by: Eric Blake

Re: Problem with brace expansion

2015-04-21 Thread Eric Blake
cannot use a variable as a bound and still expect brace expansion to work, since variables aren't expanded yet. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [PATCH] added -- in autocd

2015-04-28 Thread Eric Blake
in: > >if (autocd && interactive && words->word && is_dirname (words->word->word)) > { > + words = make_word_list (make_word ("--"), words); >words = make_word_list (make_word ("cd"), words); >xtrace

Re: [PATCH] Add EXECIGNORE

2015-05-21 Thread Eric Blake
ping - any feedback, positive or negative? On 04/17/2015 03:53 PM, Eric Blake wrote: > Based on an idea from Dan Colascione: > https://sourceware.org/ml/cygwin/2010-11/msg00022.html > > Usage: add this to your shell startup: > EXECIGNORE='*.so:*.so.*' > to cause TAB

VPATH build failure on cygwin

2015-06-02 Thread Eric Blake
ange will not break any other platforms. [1] https://cygwin.com/ml/cygwin/2015-06/msg00036.html -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: VPATH build failure on cygwin

2015-06-04 Thread Eric Blake
On 06/04/2015 12:50 PM, Chet Ramey wrote: > On 6/2/15 9:10 AM, Eric Blake wrote: > >> That is, the use of .: in VPATH is redundant, and will NOT find any >> files that were not already found if you had omitted it, because make >> already searches the current directory b

Re: Bug Reporting

2015-06-08 Thread Eric Blake
ation that we often find helpful. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Consequences of shell errors

2015-06-18 Thread Eric Blake
nd against using 'set -e' - it exists for historical practice, and does NOT generally do what you think it should. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Consequences of shell errors

2015-06-18 Thread Eric Blake
ead only $ ksh -c 'a=1; readonly a; export a=2; echo $?' ksh: a: is read only so that's arguably a bug in bash. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Consequences of shell errors

2015-06-18 Thread Eric Blake
On 06/18/2015 08:22 AM, Chet Ramey wrote: > On 6/18/15 9:08 AM, Eric Blake wrote: >> On 06/18/2015 06:51 AM, Chet Ramey wrote: > >>> >>> Neither of these are failures; the export command returns success. In >>> fact, according to Posix, the export co

Re: Consequences of shell errors

2015-06-18 Thread Eric Blake
On 06/18/2015 08:40 AM, Eric Blake wrote: > $ readonly -p > /dev/full > bash: readonly: write error: No space left on device > $ echo $? > 1 > $ > > and that is certainly not a variable assignment error :) > > At any rate, I'm opening a new Austin G

Re: "type" may return incorrect information after posix mode is enabled

2015-07-21 Thread Eric Blake
cial shell builtin" like in > dash/mksh/ksh93/yash would be nice) Yes, distinguishing between special and other built-ins would indeed be nice. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Bug in parameter parsing of test built-in

2015-07-27 Thread Eric Blake
> > $ test -n '<' -a true > -bash: test: too many arguments That's because bash is parsing it as: test \( -n \< -a \) true which is indeed syntactically invalid. You could manually add (): test \( -n \< \) -a true to force the precedence you appear to

Re: Worth mentioning in documentation

2015-08-10 Thread Eric Blake
/view.php?id=705 It is only the special builtins (such as 'exit') where POSIX does not require an exec'able counterpart. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Enhancement: bash should have uniform escape syntaxes for `echo -e`, `printf` and `$'ANSI_C_style_escape'`.

2015-08-10 Thread Eric Blake
rent escape syntaxes for `echo -e`, 'echo -e' is inherently non-portable, and exists solely for backwards compatibility. As such, it is unlikely to be changed. POSIX strongly recommends that you use 'printf' instead. -- Eric Blake eblake redhat com+1-919-301-3266

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

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: [ 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: [ 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
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: 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: 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: \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: 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: '[ --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

[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: 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

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: 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: 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
[adding the list back in with permission; please don't send private mails when the discussion may benefit others] [please don't top-post on technical lists] On 11/03/2015 11:03 AM, Julio C. Neves wrote: > Hi Eric, I wrote NUL because my english is not the best of the world, I > w

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: 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: 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: 'official function declaration format' doesn't work if alias defined

2016-01-09 Thread Eric Cook
In mksh, ksh93, zsh and maybe others, you can use quotes to suppress alias expansions during definition just like you would a simple command; unfortunately bash deems it a invalid identifier.

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: 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: 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: 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: 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: 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
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

Autocompletion problems with nounset and arrays

2016-04-26 Thread Eric Pruitt
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKA

Re: Autocompletion problems with nounset and arrays

2016-04-26 Thread Eric Pruitt
On Tue, Apr 26, 2016 at 01:54:12PM -0400, Chet Ramey wrote: > Thanks for the report. I will fix this before bash-4.4 is released. Thank you. I am happy to compile a prerelease build to try out your solution if you want another tester before you roll fix into an RC. Eric

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: Autocompletion problems with nounset and arrays

2016-04-30 Thread Eric Pruitt
On Tue, Apr 26, 2016 at 01:54:12PM -0400, Chet Ramey wrote: > Thanks for the report. I will fix this before bash-4.4 is released. Is there some way for me to work around this issue in older versions of Bash using autocompletion hooks? Eric

Re: Autocompletion problems with nounset and arrays

2016-05-01 Thread Eric Pruitt
On Sun, May 01, 2016 at 03:54:16AM -0400, Grisha Levit wrote: > Does the issue go away if you do a "bind 'set colored-stats off"' ? No. That already defaults to "off", and I don't override it. I ran the "bind" command anyway, and it didn't make a difference. Eric

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: 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: 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

Command substitution with null bytes generates warning

2016-09-15 Thread Eric Pruitt
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share

Behavior of ${var/*/text} has changed

2016-09-16 Thread Eric Pruitt
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share

Re: Behavior of ${var/*/text} has changed

2016-09-16 Thread Eric Pruitt
="$(jobs)" # [...] PS1="${SSH_TTY/?*/\\u@\\h:}\\W${jobs/?*/ [\\j]}\\$ " # [...] } In this example, I want to show the username and hostname if SSH_TTY is set and not empty, but I do not want to modify its value. I am also showing the number of jobs in brackets, but I only want to do that if there are some jobs in the background. Eric

Re: Behavior of ${var/*/text} has changed

2016-09-16 Thread Eric Pruitt
On Fri, Sep 16, 2016 at 12:30:59PM -0700, Eric Pruitt wrote: > > That, or ${VAR:+not empty} which is how I suggest testing for variable > > set-and-not-empty-ness. > > I'm aware of that construct, but that doesn't do what I want unless I'm > missing something;

Re: Behavior of ${var/*/text} has changed

2016-09-16 Thread Eric Pruitt
On Fri, Sep 16, 2016 at 03:45:39PM -0400, Greg Wooledge wrote: > On Fri, Sep 16, 2016 at 12:38:20PM -0700, Eric Pruitt wrote: > > first time. However, that construct still won't work because if a > > variable is defined, it will still choose "not empty:" > &

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: 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-10-05 Thread Eric Pruitt
in testing the patch. In the script where I ran into this problem, I simply suppressed the warning using 2>&-, and that's what I will continue to do if I will knowingly read files that contain null bytes. Eric

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: [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

Option to disable VSUSP at prompt (feature request with proof of concept)

2016-11-24 Thread Eric Pruitt
concept rather than a pull request. Please let me know what you think. Thanks, Eric --- eval.c 2016-06-02 15:49:27.0 -0700 +++ eval.c 2016-11-20 15:02:23.681680378 -0800 @@ -31,6 +31,7 @@ #include #include +#include #include "bashintl.h" @@ -69,6 +70,8 @@ int reade

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: Option to disable VSUSP at prompt (feature request with proof of concept)

2016-12-21 Thread Eric Pruitt
On Thu, Nov 24, 2016 at 12:05:20AM -0800, Eric Pruitt wrote: > In my Bash configuration, I have things setup so Ctrl+Z is no longer > translated into a signal at the Bash prompt so it can be remapped. Most > recently, I decided to modify the Bash source to implement this change

Re: Option to disable VSUSP at prompt (feature request with proof of concept)

2016-12-22 Thread Eric Pruitt
would be better implemented in C. Changing VSUSP natively is also far faster than calling stty. Eric

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: 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: 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

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: "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

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: [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: 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: whats wrong , exit code 11 on android termux

2024-08-09 Thread Eric Pruitt
that you might get in trouble for **not** addressing someone with a title. Some of my older relatives will even address me as Mr. [...] or Mister [...] when sending me physical letters. Eric

Re: history -f filename

2024-12-02 Thread Eric Pruitt
BASHPID; f() { echo Function: $BASHPID; }; f Parent: 2484818 Function: 2484818 ~$ echo Parent: $BASHPID; f() ( echo Function: $BASHPID ); f Parent: 2484818 Function: 2493192 Eric

Re: Bash' code to store string of any characters containing pair of "" and '' at once

2024-12-21 Thread Eric Pruitt
ot;\" escape inside of single quotes, you would end up with something more convoluted, like: $ x='foo "foo" and '"'"'bar'"'"' content' $ echo "$x" foo "foo" and 'bar' content Alternatively: $ x='foo "foo" and '"'bar' content" $ echo "$x" foo "foo" and 'bar' content Eric

Re: [Bug 103756] kate: syntax highlighting error: bash and escaped quotes

2007-04-02 Thread Eric Blake-1
"'\"")" <-- this should be syntactically equivalent?! $() has different rules than ``. Inside $(), any valid script is allowed, and by itself, echo "'\"" is a valid script. And inside "$()", the rules are explicit that the contents of the $

Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed

2007-09-10 Thread Eric Blake-1
> What's needed is a portable interface like BSD's fpurge(3). Gnulib provides this[1]. Maybe you should consider using gnulib to enhance the portability of future versions of bash. [1] http://www.gnu.org/software/gnulib/MODULES.html#module=fpurge -- Eric Blake -- View th

Re: trap 'echo "trap exit on ${LINENO}"' EXIT -> wrong linenumber

2010-09-18 Thread Eric Blake (cygwin)
unspecified. This volume of POSIX.1-2008 specifies the effects of the variable only for systems supporting the User Portability Utilities option. -- Eric Blake volunteer cygwin package maintainer CYGWIN-ANNOUNCE UNSUBSCRIBE INFO: = To unsubscribe to the cygwin

Request For Enhancement - TID variable

2019-12-26 Thread Eric S. Raymond
devs are too busy for this like the idea, I could write the patch. -- http://www.catb.org/~esr/";>Eric S. Raymond During waves of terror attacks, Israel's national police chief will call on all concealed-handgun permit holders to make sure they carry firearms at a

Re: Request For Enhancement - TID variable

2019-12-26 Thread Eric S. Raymond
bout its calling context and is complaining that it can't write a directory atomically. Not bash's problem. Carry on! -- http://www.catb.org/~esr/";>Eric S. Raymond

GNU Bash 4.4 Test Discrepancy on OpenVMS

2016-10-07 Thread Eric W. Robertson
7)) == 0) #else # define IN_CTYPE_DOMAIN(c) isascii(c) #endif For platforms that do not implement the isascii() function the above definition for the IN_CTYPE_DOMAIN() function macro is more likely to produce correct behavior than its current definition in the Bash 4.4 release. As always any additional wisdom and/or feedback that can be provided regarding the above is greatly appreciated. Thanks, Eric

Re: GNU Bash 4.4 Test Discrepancy on OpenVMS

2016-10-12 Thread Eric W. Robertson
Chet, OK. No worries then. Thanks for the prompt reply and the clarification regarding when isascii() is actually needed. Regards, Eric On 10/10/2016 4:01 PM, Chet Ramey wrote: On 10/7/16 12:54 PM, Eric W. Robertson wrote: While building and testing GNU Bash 4.4 on OpenVMS, the GNU Bash

PATCH [1/1]: compressedand - escape single ampersand found in URLs

2020-04-22 Thread Gonzalez, Eric (UMKC-Student)
4.23(1)-release (x86_64-pc-linux-gnu) GNU bash, version 5.0.16(1)-maint (x86_64-pc-linux-gnu) I haven't looked up to see what POSIX has to say about this, but I'm fairly confident that this flies in the face of it. If that's the case and this patch is dismissed accordingly,

<    2   3   4   5   6   7