Re: bash-4.3 bug report

2014-04-14 Thread Eric Blake
o examine it > more closely to find out why it's a good idea in this case to use an array > index and *then* sanity check it's value. So use that as the justification for the patch, rather than expecting us to figure it out your intentions on our own. -- Eric Blake eblake redh

Re: printf octal literals

2014-05-05 Thread Eric Blake
gt; entirely: > > $ ksh -c 'printf "<%.010d> <%.*d>\n" 1 010 1' > <01> <01> I actually think the ksh behavior makes more sense; and bash could change to be made compatible with ksh without violating any POSIX constraints. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: $HOME does not get abbreviated in prompt \w output when there is a trailing slash

2014-05-23 Thread Eric Blake
comparisons */ > + for (l = home ? strlen (home) : 0; l > 1 && home[l-1] == '/'; l--); > + Does this still work correctly on systems where / and // are distinct (as allowed by POSIX) and someone has set $HOME to //? -- Eric Blake eblake redhat com+1-9

Re: What is the difference between a newline and a semi-colon?

2014-05-30 Thread Eric Blake
cution, not parse). (I've seen ONE case where an alias can do things that a function cannot: writing an alias for 'find' that temporarily inhibits globbing on the arguments for JUST the find command - that has to be done via an alias, because it depends on affecting the parse, and a fu

Re: What is the difference between a newline and a semi-colon?

2014-05-30 Thread Eric Blake
On 05/30/2014 12:40 PM, Andreas Schwab wrote: > Bruce Korb writes: > >> Thanks, Eric & Chet. I hope nobody ever needs to load up a set of >> aliases within a Makefile script. > > A non-interactive shell does not have aliases. Unless you explicitly turn them on.

Re: Aborting prompt with Ctrl-c sets exit status variable ($?) to 130

2014-06-04 Thread Eric Blake
t at least we're in good company, since ksh has the same behavior (well, there $? is set to 258, since ksh takes advantage of the POSIX rule that it can represent exit due to signal in $? by using values that are unambiguous with regular exit). zsh almost has the same behavior, except it se

Re: Fwd: Patch for full hostname in PS1

2014-06-09 Thread Eric Blake
ver and on individual subscribers behind bandwidth limits. Sending the text patch (several kilobytes) is sufficient. Furthermore, your binary build is unlikely to run on anyone with a system configured differently than yours, while anyone can apply your patch and rebuild it to test the quality of you

Re: Inconsistent string comparison operators n and z

2014-06-09 Thread Eric Blake
name`" ]; then echo "r" ; else echo "not r" ; fi > $ if [ -n "`pgrep pname`" ]; then echo "r" ; else echo "not r" ; fi > $ if [ ! -n "`pgrep pname`" ]; then echo "not r" ; else echo "r" ; fi Glad you figured out your quoting bug. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: unhelpful effect of '!' prefix on commands in conditionals - a bug ?

2014-06-13 Thread Eric Blake
t; in the conditional ? Don't use ! in the conditional. Take time to grab the status yourself. $ if _F ; then :; else echo '_F returned: '$?; fi > > Is there any other conclusion than : "if you want to access the return > status of a > function in an if clause ,

Re: umask --help

2014-07-07 Thread Eric Blake
d generic support for --help to all builtins, instead of requiring users to remember 'help foo' as yet another item in their arsenal alongside 'info foo', 'man foo', and 'foo --help'. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualiz

Re: Tilde expansion during command search

2014-07-23 Thread Eric Blake
> The only concerns I can think of are inconsistency with programs that use > execvp(), or possibly double-expansion in the event of a user name or any > path > containing ~. > > You're probably right in that it's not super critical if it hasn't caused > prob

Re: Tilde expansion during command search

2014-07-23 Thread Eric Blake
On 07/23/2014 08:08 AM, lolilolicon wrote: > On Wed, Jul 23, 2014 at 9:58 PM, Eric Blake wrote: >> >> Might be worth asking the POSIX folks if it is allowed by POSIX. What >> do other shells do? > >>From this page: http://pubs.opengroup.org/onlinepubs/7908799/xcu

Re: Tilde expansion during command search

2014-07-23 Thread Eric Blake
On 07/23/2014 08:38 AM, Eric Blake wrote: > On 07/23/2014 08:08 AM, lolilolicon wrote: >> >From this page: http://pubs.opengroup.org/onlinepubs/7908799/xcu/chap2.html >> >> Note that the tildes are expanded during the assignment to PATH, not >> when PATH is

Re: Tilde expansion during command search

2014-08-01 Thread Eric Blake
assignments and word expansions. And that bash is the odd one out in comparison to all other shells. I think bash is buggy for performing tilde expansion during PATH lookup for literal tildes contained in PATH, because no other shell does it, and POSIX does not specify that it would happen.

Re: Fwd: Bash uses lseek while reading from serial device

2014-08-18 Thread Eric Blake
he next cygwin dll release, with no need for bash to do anything differently than it has always done. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: "echo" does not follow the "getopt" convention

2014-08-19 Thread Eric Blake
ho -n > ~$ echo -n -n > ~$ echo -n -- -n # I think that the output should just be "-n" not "-- -n". > -- -n~$ For that matter, POSIX requires this to output "-n -- -n", since POSIX does not allow for echo to interpret -n. In fact, if you do 'shopt -s xpg_e

Re: Substring Expansion does not work as intended

2014-08-20 Thread Eric Blake
d: ef > Got: abcdef echo "${x: -2}" > > or: > x="abcdef"; echo "${x:-2:1}" > Expected: e > Got: abcdef echo "${x: -2:1}" -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread Eric Blake
th m4 and gawk use it so that a stack recursion exits gracefully rather than with a segfault and core dump (after all, it's the user's fault for putting in bad input, not a bug in the program). Maybe it's worth investigating if bash could link with it? -- Eric Blake eblake redha

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread Eric Blake
limit we pick, other than unlimited (your proposal of turning it to 0), would be an arbitrary limit for someone who has a machine with more memory and a larger stack. So 0 is the only sane default, but that's no different than what we already have. -- Eric Blake eblake redhat com

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread Eric Blake
of the default behavior of dumping core). But someone would have to write the patch for bash to link against libsigsegv. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread Eric Blake
be on by default. Which means that you will only know if the solution makes a difference for your program if you first run the program unlimited - but then you are back to the earlier question of whether bash can give a nice error message instead of a core dump when exiting due to stack overflow. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread Eric Blake
n the stack overflows due to a buggy user input. It's not a bug in bash, but in the user program; and that's WHY libsigsegv exists (to convert what would have been a core dump into a nice error message, making it obvious that the bug was in the user input). -- Eric Blake eb

Re: SEGFAULT if bash script make "source" for itself

2014-08-28 Thread Eric Blake
add libsigsegv? Patches speak louder than words in open source projects. If you are up to taking on the task, go for it. You can use GNU m4 and gawk as examples of programs that have integrated in libsigsegv stack overflow detection. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Bash-4.3 Official Patch 25

2014-09-24 Thread Eric Blake
t;(){ :; }" $ f='() { :; }' bash -c 'type f; echo "\"$f\""' f is a function f () { : } "" and I'd feel much more comfortable with exporting f()=... as the backdoor for passing the function definition, _particularly_ since the shell already al

Re: Issues with exported functions

2014-09-25 Thread Eric Blake
rstand the SAME interpretation of 'f()=...' in the environment as a way to export shell functions, and leave 'f=() {...' as a raw normal variable and avoid intruding on the user's possible string space. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Bash security issue

2014-09-25 Thread Eric Blake
On 09/25/2014 11:21 AM, Nick Bowler wrote: > On 2014-09-25 08:55 -0600, Eric Blake wrote: >> On 09/25/2014 07:51 AM, Bob Friesenhahn wrote: >>> It may be that some users of 'autoconf' will be at risk due to the dire >>> bash security bug described at >>

Re: Bash security issue

2014-09-25 Thread Eric Blake
On 09/25/2014 01:15 PM, Linda Walsh wrote: > Eric Blake wrote: >> And _that's_ what I want changed, by proposing that bash use 'f()=...' >> rather than 'f=() {...' as the magic it uses for exporting functions >> from parent to child. >> > -

Re: readline dynamic library configuration for cygwin

2005-08-09 Thread Eric Blake
5.1-alpha1/support/shobj-conf2005-08-06 15:03:02.389125000 - 0600 > -466,6 +468,23 > SHLIB_STATUS=unsupported > ;; > > +cygwin*) ... > + SHLIB_LIBS=-lcurses SHLIB_LIBS='$(TERMCAP_LIB)' -- Eric Blake __

Re: --with-installed-readline breaks tilde-expansion

2005-08-12 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 7/23/2005 7:14 AM: > > The following patch, to both readline and bash, allows readline to export > a hook (rather than trying to import a function, which doesn't work in > dynamic libraries for at least

Re: --with-installed-readline breaks tilde-expansion

2005-08-12 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 8/12/2005 7:20 AM: > According to Eric Blake on 7/23/2005 7:14 AM: > >>>The following patch, to both readline and bash, allows readline to export >>>a hook (rather than trying to import a functio

memleak in sh_realpath

2005-08-27 Thread Eric Blake
n the presence of drive letters. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozde

Re: Change of the Makefile

2005-09-21 Thread Eric Blake
ately, it is an extension of GNU make that is not portable to other make programs. If bash is to remain compilable on as many platforms as it currently is, its Makefiles must not be changed to use these non-portable extensions. -- Eric Blake ___ Bug-ba

Re: [PATCH] fix bashdb script handling of tmp directory

2005-09-22 Thread Eric Blake
:$line $bp $cl${_lines[$line]}" >fi > } > > @@ -564,7 +564,7 @@ > let _i=1 > > # Be careful about quoted newlines > -_potbelliedpig=${TMPDIR-/tmp}/$_guineapig.$$ > +_potbelliedpig=${TMPDIR-/tmp}/${_guineapig/*\//}.$$ > sed 's,\\$,,' $_guineapig > $_potbelliedpig > > Thanks, > Devin Bayer &g

bug in builtins.1

2005-10-15 Thread Eric Blake
.SH SEE ALSO bash(1), sh(1) - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http

Re: ksh style [[ conditional does not match patterns

2005-12-08 Thread Eric Blake
;t affect $PIPESTATUS? $ echo ${BASH_VERSINFO[*]} 3 00 16 12 release i686-pc-cygwin - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblak

readline signal bug

2005-12-23 Thread Eric Blake
This was reported on the cygwin list. I don't know if bash-3.1/ readline-5.1 have fixed the issue or not. I also don't have access to a debian machine to try reproducing it myself. -- Forwarded Message: -- From: Christopher Faylor <[EMAIL PROTECTED]> To: cygwin@cygwin.com

Re: $(case x in x)...

2005-12-28 Thread Eric Blake
substitution; this is no longer the case with the POSIX shell." Therefore, I read this as stating that POSIX requires your example to succeed, and that bash has a bug (FYI, the bug also appears in my installed versions of zsh and ksh). Meanwhile, as a workaround, use: $ k=$(case x in (x) :;

Re: $(case x in x)...

2005-12-28 Thread Eric Blake
t answer of the three bash 3.1.1: $ echo $( > cat << /eof > a here-doc with ) a here-doc with $ # oops, the ) in the here-doc was consumed to close the $(), and $ # without a warning of a missing eof delimiter $ echo $( > echo abc # a comment with ) > ) abc ) $ # oops, an

Re: $(case x in x)...

2006-01-02 Thread Eric Blake
> Eric> $ k=$(case x in (x) :; esac) > Huh, they only taught us ) in school. > Is () since Bell Labs days too? POSIX requires shells to support case x in (x), but older bourne shells do not support this newer syntax. That is probably why you were not taught it; if I understand corre

Re: $(case x in x)...

2006-01-04 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 12/28/2005 12:00 PM: > > My results: bash 3.1, with or without patch 1, still has > the bug. > > $ k=$(case x in x) echo hi; esac) > bash: syntax error near unexpected token `esac' While we are co

Re: I wish hash -r (or something like it) would happen automaticly

2006-01-07 Thread Eric Blake
in PATH prior to the hashed location of a command. Maybe someone would like to submit a patch that does that? If so, it would probably belong to another shopt setting, since the point of hashing is to avoid extra stat calls. - -- Life is short - so eat dessert first! Eric Blake [EM

Re: Conditional expression problem: both "-a file" and "! -a file" return true

2006-01-07 Thread Eric Blake
Also, be aware that bash also defines a unary -o, so the following also has strange results, for the same reasons as above: $ set -o monitor $ rm -f monitor $ test -o monitor && echo true true $ test ! -o monitor && echo true true - -- Life is short - so eat dessert first! Eric

Re: bash -c error

2006-01-10 Thread Eric Blake
e that if your script strives for POSIX conformance, you must pass a utility name as an argument to time; it is a bash extension that time works without arguments. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.

Re: Conditional expression problem: both "-a file" and "! -a file" return true

2006-01-12 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 1/7/2006 8:17 AM: > > Now, in this case, you have three arguments, and POSIX requires that the > binary operator "-a" have higher precedence than the "!" negation operator > on a 2-argument

Re: Botched assertion in malloc]

2006-01-24 Thread Eric Blake
d > Stopping myself...-bash: [: =: unary operator expected > > > Repeat-By: > > Logging in via SSH Works for me. You'll have to provide more details, such as the actual line with [ that failed when bash tried to execute it. - -- Life is short - so eat dessert first! Eric

Re: prompt with \[ \] corrupted by vi history search

2006-02-08 Thread Eric Blake
tch > that comments out the troublesome code. My only concern is whether this patch also affects {non-,}incremental searches in emacs mode. But it sure solves the display bugs of doing non-incremental searches in vi mode. Thanks for the patch. - -- Life is short - so eat dessert first! Eri

Re: prompt with \[ \] corrupted by vi history search

2006-02-18 Thread Eric Blake
#x27; # After this, I hit [ENTER][ESC]/P[Ctrl-c] % % % / % / % /P % # Wow - look at those extra lines! - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net

Re: prompt with \[ \] corrupted by vi history search

2006-02-18 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 2/17/2006 9:48 PM: > > It seems I spoke too soon. Your patch works great on single-line prompts > with invisible characters, but breaks on multiline prompts. I have tested this patch with both emacs (M-p) an

Re: behavior diff. btw. 3.0 and 3.1 (may be a bug)

2006-02-24 Thread Eric Blake
wline]a'. So I think you did find a regression - bash 3.0 is correct in preserving the newline between the quoted backslash and remaining characters, while bash 3.1 (through patchlevel 9) is incorrect in performing newline joining. - -- Life is short - so eat dessert first! Eric Blake

Re: Bash-3.1 Official patch 10

2006-02-24 Thread Eric Blake
'a\') a\ So as a workaround, the test can be rewritten: status=$(echo '-'| { ${GREP} -E -e 'a\' >/dev/null 2>&1 ; echo $?; }) - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: G

Re: incorrect handling of invisible characters in prompt string

2006-03-03 Thread Eric Blake
[Please use mailing lists instead of sending private mail to random developers - I don't know whether you intended this as a question about bash proper or about the cygwin port of bash, so I have cross-posted my reply] > Hi Eric, > > I found the following message (from July 2005)

Re: quoting inside backquotes in 3.1

2006-03-06 Thread Eric Blake
involve finding a different way to solve the original problem that > prompted the change. > I look forward to seeing what you come up with. I wish I could help by coming up with a solution myself, but have not had time to do so yet. -- Eric Blake _

Re: quoting inside backquotes in 3.1

2006-03-07 Thread Eric Blake
necessary, open up a second web-based email account rather than sending from an account that includes such a disclaimer. -- Eric Blake ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: quoting inside backquotes in 3.1

2006-03-07 Thread Eric Blake
of `` when searching for the terminating ` are the constructs \\, \`, and \$. > > I will see if I can find a way to preserve backwards compatibility. > -- Eric Blake ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: document that echo can't be given a NULL

2006-03-10 Thread Eric Blake
command's output. POSIX doesn't specify whether this behavior is allowed or not, but I think it makes more sense for command substitution to strip NULs than to risk the inconsistency of arguments being chopped short as they are passed through exec() calls. -- Eric Blake __

Re: BUG: ls -ld directory/

2006-03-10 Thread Eric Blake
mailed the bug-coreutils mailing list. However, my guess is that you have an alias in place such that you are executing 'ls -F' or 'ls -p' rather than 'ls'. Try 'type ls' to learn more about what is really happening, before incorrectly calling this a bug.

Re: LINES and COLUMNS variables are not exported

2006-03-10 Thread Eric Blake
export LINES COLUMNS before invoking your app that does not know how to query the terminal for its normal size. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.com

Re: Possible race in bash signal handling?

2006-03-23 Thread Eric Blake
- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.m

Re: echo "enhancement" leads to confused legacy script tools...

2006-03-28 Thread Eric Blake
ing shopt -s xpg_echo), both -e and -n should therefore be literal strings, not options. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~eri

Re: i/o redirection into variables

2006-03-28 Thread Eric Blake
> > I would like to redirect into a variable. variable=$(command 2>&1) - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.g

tail after tab completion in prompt

2006-03-31 Thread Eric Blake
- William - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFELUiy

Re: test -f with no args is true

2006-04-15 Thread Eric Blake
ate POSIX semantics. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org i

Re: paste-from-clipboard dosen't works on Cygwin platform

2006-04-18 Thread Eric Blake
adline feature off (add "set bind-tty-special-characters off" to ~/.inputrc), or to tell your terminal to not bind Ctrl-V (add "stty lnext undef" to your ~/.bash_profile). If you like emacs bindings, where Ctrl-Q is the quoting character instead of Ctrl-V, you could do "stty

Re: Builtin command echo does not work properly.

2006-04-19 Thread Eric Blake
t, which is why it will accept options even when bash won't. -- Eric Blake ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: Bash-3.1.17 gets lost looking for end of string in certain contexts

2006-05-02 Thread Eric Blake
re are still some known issues with `` command substitution parsing in bash-3.1 that have been previously reported, such as http://lists.gnu.org/archive/html/bug-bash/2006-03/msg00039.html. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGN

Re: Bash-3.1.17 gets lost looking for end of string in certain contexts

2006-05-02 Thread Eric Blake
[Please keep replies on the list, so that others that encounter the same problem may see it in the archives, and so that you can get comments from more than just me.] > On Tuesday 02 May 2006 09:15, you wrote: > > According to Richard on 5/1/2006 5:46 PM: > > > 602 status=`echo 'beriberi'| {

Re: Fwd: Re: Bash-3.1.17 gets lost looking for end of string in certain contexts

2006-05-04 Thread Eric Blake
t - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEWfmR84KuGfSFAYARAsYZAKD

Re: tail after tab completion in prompt

2006-05-06 Thread Eric Blake
\d > > \t\a\]\[\e[31;1m\][\[\e[36;[EMAIL PROTECTED] > > \[\e[33;1m\]\W\[\e[31;1m\]]\[\e[34;1m\]\[\e[32;1m\]\$ \[\e[37;1m\]" > > - ---8<->8--- > > > > If type "ls /usr/src" twice, it will show "ls /usr/s

Re: feature request

2006-06-01 Thread Eric Blake
the exit > code of each command when it terminates. Bash already has this, in the prompt. For example, I use: PS1='${PIPESTATUS[*]}\$ ' At which point I see the exit status of every command in the previous pipeline. - -- Life is short - so eat dessert first! Eric Blake

Re: feature request

2006-06-03 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Please keep replies on the list, so that others may help with suggestions. According to A P Garcia on 6/1/2006 12:54 PM: > On 6/1/06, Eric Blake <[EMAIL PROTECTED]> wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 &

Re: Syntax error with background jobs in loops

2006-06-08 Thread Eric Blake
' or ';'. Using BOTH '&' and ';' is the true syntax error, and the above example is not a workaround, but the correct syntax. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.

Re: range [A-Z] bug

2006-06-16 Thread Eric Blake
Try repeating the test when LC_ALL=C is in your environment, to see the difference. Some locales, such as en_US.utf8, intentionally do case folding in ranges, so that [A-Z] is interpreted as [AbBcC...zZ]. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -

Re: Cygwin and Vista

2006-06-18 Thread Eric Blake
ion of bash depends on) has not yet been ported to that platform. At any rate, the cygwin mailing list is a better place to ask these sorts of questions. -- Eric Blake ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: Bash expansion nuance or bug?

2006-06-21 Thread Eric Blake
he alias is also checked for alias expansion." This is intentional, so that you can do something like: alias nice='nice -n 5 ' and then 'nice ls' will still use the aliases you normally have for ls. -- Eric Blake ___ Bug-bash mailing

Re: terminating lines with accidental eof

2006-07-05 Thread Eric Blake
; xn-CDO-2 $ cd / > xn-CDO-2 $ echo $PWD > / POSIX requires this behavior, whether bash is emulating sh (in which case, it is really trying to be POSIX compliant, rather than compatible to old broken bourne sh), or using full extensions. - -- Life is short - so eat dessert first! Eric

Re: why doesn't this error message go to the bit bucket?

2006-08-28 Thread Eric Blake
h as ash) is to use a subshell to test whether it will work first: $ (unalias foo) >/dev/null 2>&1 && unalias foo - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key

Re: functions and set -e

2006-08-29 Thread Eric Blake
uot; causes the > function call to end up with a nonzero exit status only bacause the > statement appears *on the last line* of the function. The exact same > statement on the first line of the function behaves as expected. As marked above, the line causing bash to exit is n

Re: Problems with bash+cygwin and longjmp

2006-09-07 Thread Eric Blake
en disabling the problematic driver so that it quits interfering with cygwin. But bash is using longjmp correctly, so there is no bug to report on this list. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] volunteer cygwin bash packager -BEGIN PGP SI

Re: The removal fails if the first number é p receded from one zero not meaningful one.

2006-09-07 Thread Eric Blake
bers, then getting a decimal answer. > > Case 2) > > pippo=$[09-1] Again, you used octal numbers, except that 8 and 9 are not valid octal digits. Don't use the leading 0 if you don't want octal numbers. - -- Life is short - so eat dessert first! Eric Blake [E

Re: set -e vs. !

2006-09-08 Thread Eric Blake
ollowing a while, until, or if keyword, and is not a part of an AND or OR list, and is not a pipeline preceded by the ! reserved word, then the shell shall immediately exit. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Versi

Re: Bash2 segfaults in while: do loops

2006-09-15 Thread Eric Blake
- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.m

Re: Reading bytes one-by-one from pipe of process substitution

2006-09-28 Thread Eric Blake
sn't consume it all. But this is unacceptable for a shell. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblak

Re: Can I get a hint, please?

2006-10-07 Thread Eric Blake
ines the command enough to know which options take arguments so that reordering will not change the semantics of the command sounds admirable, but doing so by parsing the target executable just does not sound like the right approach to me. We don't need to bloat bash by adding all

Re: Problem with echo -e in bash 3.2

2006-10-21 Thread Eric Blake
specify > echo -e). It looks like it is time for coreutils to revisit how /bin/echo should behave, with or without the presence of POSIXLY_CORRECT. It would be good for coreutils 6.4 to match bash 3.2 in what escape sequences it understands. - -- Life is short - so eat dessert first! Eri

Re: Spaces in args, escapes, and command substitution

2006-10-28 Thread Eric Blake
o=$file" > done > --- > > The backticks work perfectly. > But the $() gets it very wrong and leaves a double-quote in the result. That's because `` and $() have different syntax, as required by POSIX. You should just do $(basename "$f1"), rather than

Re: Spaces in args, escapes, and command substitution

2006-10-28 Thread Eric Blake
or not, POSIX standardized the original bourne shell `` behavior, as well as the ksh $() behavior, and the two behaviors are different. Get used to it. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Versio

Re: Spaces in args, escapes, and command substitution

2006-10-29 Thread Eric Blake
e the POSIX-specified: find . -exec grep -q PATTERN {} \; -exec vi {} + That will execute grep once per file, then aggregate the successful matches into a single invocation of vi (assuming you don't exceed ARG_MAX limits), properly accounting for spaces in filenames. - -- Life is s

Re: Spaces in args, escapes, and command substitution

2006-10-29 Thread Eric Blake
t POSIX leaves unspecified. But you are correct that no one uses ^ for pipes any more - POSIX does not allow ^ to mean pipes. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at

Re: Spaces in args, escapes, and command substitution

2006-10-29 Thread Eric Blake
u set IFS for the vi, but not for the command substitution. Break your result into two commands: IFS='\n' vi $(grep -l PATTERN *) - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment

Re: Spaces in args, escapes, and command substitution

2006-10-29 Thread Eric Blake
, and newline, regardless of the IFS setting. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG w

Re: Spaces in args, escapes, and command substitution

2006-10-29 Thread Eric Blake
reak too many existing scripts. The best you can do now is learn how they do behave, and code accordingly. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.co

Re: [bash-testers] Re: readline-5.2-1 prompt issue on cygwin

2006-11-09 Thread Eric Blake
p_offset. */ - - if (linenum == 0 && (MB_CUR_MAX > 1 && rl_byte_oriented == 0) && + if (linenum == 0 && (/*MB_CUR_MAX > 1 &&*/ rl_byte_oriented == 0) && cpos_adjusted == 0 && _rl_last_c_pos !

Re: [bash-testers] Re: readline-5.2-1 prompt issue on cygwin

2006-11-09 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 11/9/2006 10:04 PM: > > This patch fixes this particular test case for me, but I have no idea if > it is correct or breaks something else. The idea is that even when > MB_CUR_MAX == 1, the cursor absolute

Re: [bash-testers] Re: readline-5.2-1 prompt issue on cygwin

2006-11-10 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 11/9/2006 10:10 PM: > > Indeed, this alternative patch also seems to fix the test case for me: > > --- bash-3.2-orig/lib/readline/display.c 2006-09-14 12:20:12.0 > -0600 > +++ bash-3.2/lib/

Re: sh, pwd -P and $PWD

2006-11-13 Thread Eric Blake
stration required to read the draft; final version expected in 2008) may relax this so that 'pwd -P' is once again non-state-changing. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Cygwin) Comment:

botched configure check for /dev/stdin

2006-11-15 Thread Eric Blake
& /bin/test -r /dev/stdin < /dev/null; then bash_cv_dev_stdin=present else bash_cv_dev_stdin=absent - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Cygwin) Comment:

Re: bash hash bug

2006-11-24 Thread Eric Blake
n't need to be a redundant path search, and the `hit count', which is > just a coarse estimate of hashing effectiveness, will be more meaningful. Any chance this can be made an official patch for 3.2, or do I have to wait until 4.0 to get this performance increase? - -- Life is short

Re: bug with built-in printf

2006-12-06 Thread Eric Blake
* signed for ' ' padding in base 10 */ - flags = (*p->pf == 'u' || *p->pf == 'U') ? FL_UNSIGNED : 0; + flags = (*p->pf == 'u' || *p->pf == 'U' || *p->pf == 'x' || *p->pf == 'X' + || *p->pf == 'o') ? FL_UNSIGNED : 0; if (*p->pf == 'X') flags |= FL_HEXUPPER; -- Eric Blake ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: mkfifo and tee within a function

2006-12-06 Thread Eric Blake
presence or absence of job control is not the best criteria for whether to do the /dev/null redirection. The initial /dev/null redirection MUST occur in non-interactive shells, even if job control is active. However, for interactive shells, it is still acceptable to use the presence of job cont

Use of TMPDIR crashes bash

2006-12-13 Thread Eric Blake
st.c, pass the MT_USETMPDIR flag on to sh_mktmp*. In lib/sh/tmpfile.c, use snprintf instead of sprintf, to avoid writing past the end of the xmalloc'd array. -- Eric Blake ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

<    1   2   3   4   5   6   7   >