Re: bash upgrade 3.2_048 -> 4.0_028 breaks the source command

2009-07-26 Thread Eric Blake
foo > sh: line 0: .: foo: file not found Not a bug. POSIX requires this. http://lists.gnu.org/archive/html/bug-bash/2009-07/msg00069.html - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version

Re: mtab and /proc/meminfo

2009-10-20 Thread Eric Blake
you considered that this might be libc's doing, as part of implementing malloc()? - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericbl

Re: value too great for base (error token is "0008")

2009-11-04 Thread Eric Blake
u can do it via POSIX and without a loop by using an intermediate variable: foo=00081 bar=${foo%%[!0]*} foo=${foo#$bar}} - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Publ

Re: IFS handling and read

2009-11-26 Thread Eric Blake
k too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEUEARECAAYFAksO4IwACgkQ84KuG

Re: <( error

2009-11-28 Thread Eric Blake
at lacks od. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigma

Re: bash 3.2.39 -- race condition

2009-11-30 Thread Eric Blake
under the hood. http://www.chiark.greenend.org.uk/~sgtatham/aliases.html But yes, other than cool hacks like that, functions are almost always hands down more powerful than aliases. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -BEGIN

Re: Options for IPC between bash processes under cygwin

2009-12-04 Thread Eric Blake
n, although there are still some bugs being hammered out when trying to have multiple simultaneous writers to a named pipe. Also, whereas you can do <>pipe on Linux, that won't work on cygwin (where named pipes must be read-only owr write-only). - -- Don't work too hard, make s

Re: kill builtin incorrectly works with -s -n and -PGID options

2009-12-11 Thread Eric Blake
ke some time for fun as well! Eric Blake e...@byu.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAksiRnAACgkQ84KuGfSFAYCAHgCfe+m7

Re: nonsensical error message when backgrounding invocation of wait builtin

2009-12-30 Thread Eric Blake
s* in fact a child of this shell.) Actually, by using &, you have run wait in a subshell, and 20944 was NOT a child of the subshell. I don't know if there is anything that can be done to clarify the error message, though. - -- Don't work too hard, make some time for fun as well! Eri

Re: Error when script uses CRLF line endings w/ if stmt

2010-02-05 Thread Eric Blake
h patches and post them on this list. If not, then those patches will remain cygwin-specific. -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net signature.asc Description: OpenPGP digital signature

Re: Is there a special variable for the directory where the script is in?

2010-02-11 Thread Eric Blake
figure script generated by autoconf for a sample of how complex it can be to portably locate $myself. -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net signature.asc Description: OpenPGP digital signature

Re: cd //

2010-02-18 Thread Eric Blake
d to > inform. > Not a bug. POSIX allows implementations to treat // as an independent root (and cygwin does so); thus it must be preserved. But POSIX requires that /// be treated identically to /. -- Don't work too hard, make some time for fun as well! Eric Blake

Re: Confused about how bash breaks input into words

2010-02-23 Thread Eric Blake
uitively, I feel that the command substitution, > $(date +'%Y-%m-%d'), should be treated as a single word. Yes, it is a single word. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: gnu debugger

2010-03-09 Thread Eric Blake
On 03/08/2010 03:13 AM, Klaus Sandner wrote: > which debugger can Iuse for bash 3.2.25 For debugging the bash executable, any debugger will work, but gdb is probably the most commonly used. For debugging bash scripts, check out the bashdb package. -- Eric Blake ebl...@redhat.com+1-

Re: Return status of command substitution with $(...) "gets lost"

2010-03-10 Thread Eric Blake
l is not specified by POSIX. What would it hurt to redefine the exit status of local to reflect the status of any command substitutions performed during the local assignments (short of compatibility with zsh)? -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Return status of command substitution with $(...) "gets lost"

2010-03-11 Thread Eric Blake
ndardized in the next version of POSIX, several years from now, that would also be a good goal; help in submitting the proposal to the Austin group would be appreciated. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Source code repository

2010-03-13 Thread Eric Blake
ing recent patches, or even being modified to show patches in finer granularity). > > Can you point me to the source code repository? There is no public repository. Unfortunately, Chet has expressed a desire to keep it that way for the foreseeable future. -- Eric Blake ebl..

Re: Source code repository

2010-03-15 Thread Eric Blake
t matter, if it isn't made public? > >> Unfortunately, Chet has expressed a desire to keep it that way for the >> foreseeable future. > > I find it unfortunate, too, as it makes it very hard to follow > developments. You aren't the first with this complaint.

Re: [PATCH] trap -p does not display ignored signals inherited from parent by a bash process

2010-03-23 Thread Eric Blake
nnot modify that through any use of trap. That is, 'trap -p' is designed to output the text that will restore traps to their normal state, but since there is no way to change the state of SIGINT from being ignored, there is nothing needed in the output. -- Eric Blake ebl...@redhat.com

Re: [PATCH] trap -p does not display ignored signals inherited from parent by a bash process

2010-03-25 Thread Eric Blake
an extension in the upstream sources. But the beauty of open source is that you can use your patch, whether or not Chet applies it upstream; it's just that it becomes more of a maintenance burden on you if you have to maintain it as a fork. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: [PATCH] trap -p does not display ignored signals inherited from parent by a bash process

2010-03-25 Thread Eric Blake
On 03/25/2010 08:39 AM, Siddhesh Poyarekar wrote: > On Thu, Mar 25, 2010 at 7:19 PM, Eric Blake wrote: >> Technically, this is only a POSIX requirement on non-interactive shells. >> Interactive shells may reset ignored signals on entry, effectively >> starting life a

Re: [PATCH] trap -p does not display ignored signals inherited from parent by a bash process

2010-03-25 Thread Eric Blake
res this for non-interactive shells, and does not forbid it for interactive shells. Technically, this code could be modified to exempt interactive shells from hard-ignores, or left as is by treating both classes of shells identically in keeping things hard-ignored; either approach still meets POSIX.

Re: Built-in "test -x" fails for root on FreeBSD

2010-03-29 Thread Eric Blake
ake into account ACLs, which is one of the reasons that faccessat was standardized. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: compiling BASH on windows without cygwin not possible

2010-03-29 Thread Eric Blake
ead of bash. > > windows does not come with any such sh shell. and I need to be able to build > one from scratch. You can obtain bash pre-built for windows by going to cygwin.com. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org

Re: Built-in "test -x" fails for root on FreeBSD

2010-03-29 Thread Eric Blake
ode bits with S_IXGUO. That's because bash's sh_stataccess is a workaround for systems that lack POSIX 2008 compliance - no one ever claimed that the workaround is as good as the real thing. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: trap output piped to another program gives incomplete results

2010-03-31 Thread Eric Blake
ach condition immediately before the subshell environment was entered. Otherwise, the list shall contain the commands currently associated with each condition." -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: bash exit command should be unconditional

2010-04-08 Thread Eric Blake
;t work properly. That just means that their scripts are not POSIX compliant. They are making assumptions (such as exit in a pipeline operating in the current environment) that are not supported by POSIX. It does not mean that bash has to change behavior. Unfortunately, it could also mean fi

Re: Undocumented usage of printf?

2010-04-15 Thread Eric Blake
ubs/9699919799/utilities/printf.html "If the leading character is a single-quote or double-quote, the value shall be the numeric value in the underlying codeset of the character following the single-quote or double-quote." -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt vir

Re: Feature request: Can bash provide some mechanism for locking/unlocking?

2010-04-15 Thread Eric Blake
On 04/15/2010 08:28 AM, Clark J. Wang wrote: > In C code I can use lockf(), flock(), semaphore and mutex for locking / > unlocking. Can bash provide some similar mechanisms? man 1 flock If necessary, you may need to install: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/ -- Eric

Re: Passing variables by reference conflicts with local

2010-05-04 Thread Eric Blake
ks a subshell and consumes trailing newlines, and the whole point of this exercise is to avoid forks and spurious corruption of trailing newlines. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Passing variables by reference conflicts with local

2010-05-04 Thread Eric Blake
ry slow (no more than 1000 times per second). -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: How to overwrite a symbolic link?

2010-05-07 Thread Eric Blake
nd >> operators is not possible. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: How to overwrite a symbolic link?

2010-05-07 Thread Eric Blake
On 05/07/2010 09:31 AM, Peng Yu wrote: > On Fri, May 7, 2010 at 10:16 AM, Eric Blake wrote: >> On 05/07/2010 09:02 AM, Peng Yu wrote: >>> Suppose I need to modify one primary file slightly to do something a >>> little bit different. But I still need to do the original j

Re: How to make a directory name with '/' in it?

2010-05-17 Thread Eric Blake
ne character. Help in formulating that adjustment to the standard would be appreciated on the austin group lists (membership is free). -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: How to autocomplete after 'which'?

2010-05-21 Thread Eric Blake
is case, do autocomplete after 'which')? Consider installing the bash-completion package, which installs a number of autocompletion helpers that do the right thing, including one for 'which' that does command completion. Here's how bash-completion does it: complete -c comman

Re: How to autocomplete after 'which'?

2010-05-21 Thread Eric Blake
here is the manual for the -c option of complete. There are too > many 'complete' in man bash. Would you please point me which section > is relevant to complete -c. 'help complete' is the easiest way to see the short details; other than that, look for complete unde

Re: How to autocomplete after 'which'?

2010-05-21 Thread Eric Blake
fication > $ type _python > bash: type: _python: not found What's your distro? On fedora, do 'yum install -y bash-completion'. Or get it yourself: http://bash-completion.alioth.debian.org/files/ Then start a new shell, and compare the difference. -- Eric Blake ebl.

Re: How to autocomplete after 'which'?

2010-05-21 Thread Eric Blake
any context where you are exec'ing an external process; for example, 'env pwd', 'find . -exec pwd \;'. POSIX requires that all shell builtins that are not special builtins must also be available for exec'ing; but it also warns that some utilities that are not specia

Re: How not to expand a environment variable when doing command completion?

2010-05-24 Thread Eric Blake
onment variable"? At any rate, you should file this bug report to the bash-completion people, since that is an artifact of bash-completion, and not bash itself. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Input line length

2010-06-07 Thread Eric Blake
essage instead of a SEGV; several other GNU programs, such as guile, gawk, and m4, use this approach. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: how does escaping in "`...`" work?

2010-06-07 Thread Eric Blake
t; ends up as echo "" in some buggy shells, but: tmp=`echo "a b"` echo "$tmp" will never execute the second echo if the first one was interrupted. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: how does escaping in "`...`" work?

2010-06-07 Thread Eric Blake
xt of the command substitution, since the > quotes do not need to be escaped in that context to be seen as quotes in > the substitution context. The quotes NEED to be escaped in the quoted command substitution context, since behavior is undefined if " quotes are not escaped inside &q

Re: names with certain letters are not recognized as such

2010-06-09 Thread Eric Blake
e that such a patch doesn't adversely affect speed, and that such identifiers don't break when you switch to another locale where the same byte pattern is no longer composed of valid letters. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: How to convert symbolic links pointing outside to a file?

2010-06-14 Thread Eric Blake
erhaps, but asking on the bash list isn't the way to find out about tar. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: How to supply a string with space in it as parameter to a function?

2010-06-23 Thread Eric Blake
tent. And because POSIX says so. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: How to run something before invoking the inputted command?

2010-07-09 Thread Eric Blake
7;t even be much difference in the timestamps. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: access(2) shouldn't be used with test(1)

2010-07-20 Thread Eric Blake
k code to use stat() on systems with known-buggy access(2), and that your solution must NOT interfere with correct test behavior on systems with ACLs (that is, relying _solely_ on stat() is almost guaranteed to be wrong on any platform with alternate access controls). Meanwhile, if bash ever uses acces

Re: access(2) shouldn't be used with test(1)

2010-07-20 Thread Eric Blake
7; and not for 'test -r' or 'test -w'. Meanwhile, POSIX says that access(a,b) and faccessat(AT_FDCWD,a,b,0) must be identical in behavior. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: When to use printf instead of echo?

2010-07-26 Thread Eric Blake
there is no way to provide a ' inside '' quoting, but that there doesn't need to be a way, because "" and \ quoting are both sufficient for the task. But that is an independent question from whether to use echo or printf. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: How use a local variable in for loop?

2010-07-26 Thread Eric Blake
e a local variable) > > $ for f in a b; do echo $f; done > a > b > $ echo $f > b Local variables can only be used in functions - ergo, the answer to your question is to wrap the for loop in a function: $ func () { local f for f; do echo $f done } $ f=1; func a b; echo $f a b 1

Re: Strange behavior with job control

2010-07-27 Thread Eric Blake
curacy. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: RFE? request for an "undefined" attribute for functions

2010-08-02 Thread Eric Blake
tion?? 'function name' is a bash extension while 'name()' is POSIX. If you use standard POSIX instead of bash extensions, then your approach will more easily port to other POSIX shells. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Fix testsuite errors due to shell quoted parameter expansion issue.

2010-08-03 Thread Eric Blake
x27; + n '' val + echo 2 2 And meanwhile, I found a ksh93 parsing bug (don't know where to report that): $ ksh -c 'a(){ echo hi; }; a' ksh: syntax error at line 1: `}' unexpected $ ksh -c 'a() { echo hi; }; a' hi $ bash -c 'a(){ echo hi; }; a&#x

Re: Bad performance for substring replacement by pattern

2010-08-03 Thread Eric Blake
se can't be made O(n) with some careful thought about what is going on. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Issues when func name is the same with an alias

2010-08-04 Thread Eric Blake
reenend.org.uk/~sgtatham/aliases.html -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: How to inherent non-zero exit status using pipe?

2010-08-11 Thread Eric Blake
ated by the SIGPIPE caused when rm finishes its job and quits accepting input from yes. But you don't care whether yes was successful, just whether rm was able to do its job. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: How to inherent non-zero exit status using pipe?

2010-08-11 Thread Eric Blake
On 08/11/2010 07:46 AM, Eric Blake wrote: > On 08/11/2010 05:20 AM, Pierre Gaston wrote: >> On Wed, Aug 11, 2010 at 2:18 PM, Peng Yu wrote: >>> Hi, >>> >>> >>> The following example returns the exit status of the last command in a >>> pipe

Re: inconsistent field splitting

2010-08-20 Thread Eric Blake
' assigns the value ";" to $a. a=; assigns the empty string to a, because the ; is the metacharacter that ends the current command. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

Re: Bash style of if-then-else?

2010-08-23 Thread Eric Blake
n a related note, if you are talking in the context of autoconf-related scripts, the preference is to use 'test -f "$file"' rather than '[ -f "$file" ]', so as not to mix up [] with autoconf's use of m4 quotation characters.] -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org

Re: File name/Line numbers with tracing output.

2010-08-24 Thread Eric Blake
ke it possible to do single-step debugging, very much in the style of gdb. In fact, 'bash --debugger script' exists as a handy way to invoke bashdb on a particular script, assuming your distro has hooked all the pieces together. -- Eric Blake ebl...@redhat.com+1-801-3

Re: difference between ${1+"$@"} and "$@"?

2010-08-26 Thread Eric Blake
;$@" with an empty set of positional parameters may expand to a single empty words, instead of no words at all. Hence the ${1+"$@"} workaround for ancient shells. Versions of zsh were the most recently afflicted by this, although it has been fixed there for several years now. -- Eric Blak

Re: difference between ${1+"$@"} and "$@"?

2010-08-26 Thread Eric Blake
On 08/26/2010 10:28 AM, Eric Blake wrote: In some Bourne shells, "$@" with an empty set of positional parameters may expand to a single empty words, instead of no words at all. Hence the ${1+"$@"} workaround for ancient shells. Versions of zsh were the most recently afflict

Re: ${var:+"quo ted"} and similar, inside unquoted here-docs

2010-08-30 Thread Eric Blake
[adding bug-bash] On 08/29/2010 08:48 AM, Ralf Wildenhues wrote: With Solaris 10 sh (and others): cat< Ouch. New one to me. ksh, zsh, and dash do not echo the quotes, so I'm thinking it may be a bash bug; hence the cc. Eric, did you have this in your recent autoconf.texi a

Re: ${var:+"quo ted"} and similar, inside unquoted here-docs

2010-08-30 Thread Eric Blake
On 08/30/2010 08:57 AM, Eric Blake wrote: [adding bug-bash] On 08/29/2010 08:48 AM, Ralf Wildenhues wrote: With Solaris 10 sh (and others): cat< Ouch. New one to me. ksh, zsh, and dash do not echo the quotes, so I'm thinking it may be a bash bug; hence the cc. Sorry about that; I

Re: Wanted: bash enhancement... non-blocking 'wait'

2010-09-03 Thread Eric Blake
ead, which asynchronously checks to see if process 'n' has completed. What's wrong with using the existing 'kill -0 pid' to check if pid still exists, rather than inventing a new argument to 'wait'? -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org

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

2010-09-18 Thread Eric Blake
On 09/18/2010 12:18 PM, Chet Ramey wrote: On 9/18/10 12:57 PM, Eric Blake (cygwin) wrote: On 09/17/2010 06:37 PM, Chet Ramey wrote: I guess you could make a case to not reset $LINENO for the exit trap due to this sentence in Posix (though $LINENO is not Posix): LINENO may be optional in the

Re: How to deal with space in command line?

2010-09-20 Thread Eric Blake
and adding an environment variable to make it easier to detect when you are dealing with existing file systems with \n already in an existing file name. Help in reviewing and contributing to these proposals will be most welcome. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virt

Re: "gitk &" closes parent bash upon exit

2010-09-20 Thread Eric Blake
out to be the case, I will follow up here with more details. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org

Re: Thunderbird and Ovi.com

2010-10-14 Thread Eric Blake
On 10/14/2010 04:11 PM, Stefano Paparella wrote: Hi all I'm Stefano. I would like to report a bug (I guess so) in Thunderbird So why'd you send your report to the bash list, which is completely unrelated to Thunderbird? -- Eric Blake ebl...@redhat.com+1-801-349-26

poor <&- behavior under ulimit -n

2010-10-27 Thread Eric Blake
y redirection. But the nicer fix would be to follow ksh's lead and start saving fd's at 3, even if this means doing more bookkeeping of which fds have been put into use by the user vs. used by bash (that is, if stdin was saved by bash in fd 3, but then the script asks to redirect fd 3, then bash would have to re-save fd 3 to somewhere else). -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature

bug in pwd POSIX-compliance

2005-02-16 Thread Eric Blake
on-canonical form of the current directory. Repeat-By: $ set -o posix $ cd tmp $ mkdir a $ ln -s a b $ cd -L b $ pwd /tmp/b $ pwd -L /tmp/b $ echo $PWD /tmp/b $ pwd -P # Bug is here /tmp/a $ echo $PWD# Should print /tmp/a /tmp/b Fix: Unknown. - -- Life is short - so eat dessert fir

Re: bug in pwd POSIX-compliance

2005-02-16 Thread Eric Blake
e for now is probably the best course of action. -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: bug in pwd POSIX-compliance

2005-02-18 Thread Eric Blake
ustin mailing lists: http://www.opengroup.org/austin/mailarchives/ag/msg08028.html. Just because no non-compliant shell does it that way is not an excuse for bash to not do it, at least when bash is installed as the compliant sh. -- Eric Blake ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

More bash POSIX-compliance bugs

2005-02-21 Thread Eric Blake
no one has yet ported a newgrp utility, bash currently fails to be POSIX-compliant because of the missing newgrp builtin: $ newgrp bash: newgrp: command not found - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4

Re: More bash POSIX-compliance bugs

2005-02-23 Thread Eric Blake
provided that way; only that those utilities always be successfully found without having to search PATH. Further requirements on some of those utilities, such as cd setting PWD and changing the current directory in the calling context, are most easily implemented as a built-in; but you are righ

bug in unset in POSIX mode

2005-05-19 Thread Eric Blake
$ set -o posix $ echo unset foo > dot $ unset foo bar $ foo=bar bar=blah unset foo # BUG - foo should be unset $ echo ${foo-unset} ${bar-unset} bar blah $ unset foo bar $ foo=bar bar=blah . ./dot# Correct - only bar remains set $ echo ${foo-unset} ${bar-unset} unset blah $ -

classification indicator for character-special files

2005-05-19 Thread Eric Blake
st_mode)) - -character = '%'; +character = '^'; #endif /* S_ISCHR */ #if defined (S_ISBLK) else if (S_ISBLK (finfo.st_mode)) - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (Cy

Bug in completion code for //

2005-05-26 Thread Eric Blake
to readline 5.0. Basically, command_word_completion_hook must not turn / into //, and must not turn // into ///. And print_filename must recover when stripping the final slash turns / into '', // into /, and /// into //, before calling tilde_expand. - -- Life is short - so eat dessert first

Broken parse on `'${'`

2005-07-07 Thread Eric Blake
ing to try to continue what bash thought was an incomplete ${ variable substitution Fix: unknown - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/

Re: Broken parse on `'${'`

2005-07-07 Thread Eric Blake
t;, and print ${. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

--with-installed-readline breaks tilde-expansion

2005-07-08 Thread Eric Blake
IR)/tilde TILDE_ABSSRC = ${topdir}/$(TILDE_LIBDIR) - -TILDE_LIB = -ltilde +TILDE_LIB = @TILDE_LIB@ TILDE_LIBRARY = $(TILDE_LIBDIR)/libtilde.a TILDE_LDFLAGS = -L$(TILDE_LIBDIR) TILDE_DEP = $(TILDE_LIBRARY) - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEG

Re: Broken parse on `'${'`

2005-07-11 Thread Eric Blake
r a shame that bash provides no anonymous read-only access to a version control system, because it means pending fixes are only made public when you are ready to make a new release. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Ve

Re: incorrect handling of invisible characters in prompt string

2005-07-14 Thread Eric Blake
solves the problem of the initial prompt, but not the display after tab-completion. And it points out a flaw in the readline expand_prompt() logic for letting a zero-length \[\] invisible character marker pair change the *lip parameter to an index of a non-invisible character. - -- Life is s

lack of documentation on use of $TMPDIR

2005-07-15 Thread Eric Blake
nd it (see lib/sh/tmpfile.c). - -- 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: --with-installed-readline breaks tilde-expansion

2005-07-23 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 7/8/2005 6:48 AM: > On the cygwin list, a difference was pointed out between compilations of > bash that avoid or use --with-installed-readline: > > static_bash$ echo $HOME ~ > /home/eblake /home/eblake >

Re: patch: use spawnve() for simple commands if available

2005-07-26 Thread Eric Blake
o correctly interpret the return value of spawnve on other platforms. > + i = errno; > + sigprocmask (SIG_SETMASK, &old_sig_mask, (sigset_t *)NULL); > + if (result == -1 && i != 0) > +{ > + /* XXX Posix.2 says that exit status is 126 */ > + resul

Interactive mode, tty intr key, and $?

2005-07-26 Thread Eric Blake
e in $? [Ctrl-C] $ echo $? 2 Fix: Unknown - -- 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: bash.exe.stackdump

2005-07-27 Thread Eric Blake
bash as compiled on your machine, but no one else knows where in the code the crash happened. I would recommend that you try the official cygwin port of bash, first, and if you can still reproduce the crash, provide a formula to the cygwin list of what went wrong. From there, I can help you d

stty settings override ~/.inputrc?

2005-08-05 Thread Eric Blake
gs, rather than stty settings being forced onto key bindings every time the prompt is redisplayed. - -- 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/

readline dynamic library configuration for cygwin

2005-08-06 Thread Eric Blake
e new variables in shobj-conf. shlib/Makefile.in is also patched to pass $(bindir) on to shlib-install, since cygwin needs to know both bindir and libdir. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Cygwin) Co

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

Bash default /etc/bash.bashrc overwrites PS1 even if SUDO_PS1 is set

2017-12-18 Thread Eric Engstrom
i # Commented out, don't overwrite xterm -T "title" -n "icontitle" by default. # If this is an xterm set the title to user@host:dir Thanks, Eric -- Eric Engstrom - engst...@mtu.net - PGP Key: 0xC440235DF11F74CF $/='O'; eval ($_='print $_^pack"c25",'); __END__ 58O7O26O26O84O65O74O48O42O24O4O17O75O114O6O64O89O2O68O93O39O42O49O51O52

Re: Bash default /etc/bash.bashrc overwrites PS1 even if SUDO_PS1 is set

2017-12-18 Thread Eric Engstrom
doh - thanks - didn't think of that, and that makes more sense. Nevermind then. On 12/18/17 1:11 PM, DJ Mills wrote: > > > On Mon, Dec 18, 2017 at 11:25 AM, Eric Engstrom <mailto:engst...@mtu.net>> wrote: > > Dear Bash Maintainer(s), > > Bash&#x

extglob patterns and dotfiles

2017-12-29 Thread Eric Cook
When using an pattern that begin with an period in pattern-list, bash will include dotfiles in the results. This doesn't seem to be the case with the various korn shells that i have seen. Since extglob is based on ksh's extension to globbing, this appears to be an bug. $ shopt -s extglob; touch

Re: extglob patterns and dotfiles

2017-12-31 Thread Eric Cook
On 12/31/2017 01:47 PM, Chet Ramey wrote: > On 12/29/17 6:55 PM, Eric Cook wrote: >> When using an pattern that begin with an period in pattern-list, bash will >> include dotfiles in the results. >> This doesn't seem to be the case with the various korn shells that i ha

Re: extglob patterns and dotfiles

2018-01-02 Thread Eric Cook
On 01/02/2018 10:30 AM, Chet Ramey wrote: > On 12/31/17 10:36 PM, Eric Cook wrote: > >> So to make my request more specific, i don't think the extglob !() should >> match dotfiles when one of the patterns in the list is preceded with an >> period. >> to be mo

<    1   2   3   4   5   6   7   >