Issue with parameter and command substitution in case statement

2008-08-22 Thread John
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: i686-pc-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/loc

Bash for Windows

2008-08-22 Thread hectorchu
I've ported bash to Windows and would like my changes to be part of the main codebase. Would there be any interest in doing this?

Re: completing dir names for a certain path?

2008-08-22 Thread Chet Ramey
Matthew Woehlke wrote: Because "for some reason, non-trivial completions never seem to want to work for me"? Sigh. Ok, after trying for entirely too long, this seems to be working: completeme() { local i=0 while read l; do COMPREPLY[$((++i))]="$l" done < <( cd /some/prefix w=

Re: Bash for Windows

2008-08-22 Thread Chet Ramey
Hector Chu wrote: In terms of code impact, there is a 1800 line new file, and ifdef'ed code scattered around the other various files. Each change in existing files is very small, around 1-10 lines in each place. 38 files were changed. 2 added. Sure, I'm interested. Send them to me, please. C

Re: Bash for Windows

2008-08-22 Thread Hector Chu
This port uses mingw32 to build, producing a so called native build of bash. The existing code paths are retained (unlike earlier ports), increasing maintainability. Most attempts have difficulty with reconciling the use of fork and exec in the execute code paths. Windows only has a CreateProcess

Re: completing dir names for a certain path?

2008-08-22 Thread Matthew Woehlke
Chet Ramey wrote: Matthew Woehlke wrote: I have a function 'cs' that roughly looks like 'cd /some/prefix/$*', that I would like to have completion for. Any tips? (For some reason, non-trivial completions never seem to want to work for me :-(.) Why not write a shell function that prefixes the

Re: Bash for Windows

2008-08-22 Thread Chet Ramey
Hector Chu wrote: I've ported bash to Windows and would like my changes to be part of the main codebase. Would there be any interest in doing this? Tell me more. What makes your port different from the existing ones? Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Chet Ra

Re: completing dir names for a certain path?

2008-08-22 Thread Chet Ramey
Matthew Woehlke wrote: I have a function 'cs' that roughly looks like 'cd /some/prefix/$*', that I would like to have completion for. Any tips? (For some reason, non-trivial completions never seem to want to work for me :-(.) Why not write a shell function that prefixes the right directory to

Re: edit-and-execute-command (C-xC-e) doesn't use FCEDIT env variable

2008-08-22 Thread Chet Ramey
Francis Moreau wrote: On 8/22/08, Chet Ramey <[EMAIL PROTECTED]> wrote: Good catch. The command executed is actually fc -e "${VISUAL:-${EDITOR:-emacs}}" It's the same command for vi and emacs editing modes, though the default for vi editing mode is `vi' instead of `emacs'. The documentation

completing dir names for a certain path?

2008-08-22 Thread Matthew Woehlke
I have a function 'cs' that roughly looks like 'cd /some/prefix/$*', that I would like to have completion for. Any tips? (For some reason, non-trivial completions never seem to want to work for me :-(.) IOW, if /some/prefix has the directories 'foo' and 'bar', I would like: $ cs b ...to complet

Bash for Windows

2008-08-22 Thread Hector Chu
I've ported bash to Windows and would like my changes to be part of the main codebase. Would there be any interest in doing this?

Re: edit-and-execute-command (C-xC-e) doesn't use FCEDIT env variable

2008-08-22 Thread Francis Moreau
On 8/22/08, Chet Ramey <[EMAIL PROTECTED]> wrote: > Good catch. The command executed is actually > > fc -e "${VISUAL:-${EDITOR:-emacs}}" > > It's the same command for vi and emacs editing modes, though the default > for vi editing mode is `vi' instead of `emacs'. The documentation needs > to be u

Re: edit-and-execute-command (C-xC-e) doesn't use FCEDIT env variable

2008-08-22 Thread Chet Ramey
Francis Moreau wrote: 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-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALED

Re: Odd history clobbering.

2008-08-22 Thread Andreas Schwab
"Matthew A. R. Sherian" <[EMAIL PROTECTED]> writes: > I have seen, upon occasion, that my ridiculously long HISTSIZE (10) Do you have set HISTFILESIZE too? Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fi

Odd history clobbering.

2008-08-22 Thread Matthew A. R. Sherian
I have seen, upon occasion, that my ridiculously long HISTSIZE (10) will be truncated if two bash instances are closed at the same time. Always to 1000 lines. In order to work around this behavior I have a rather icky .bash_logout that uses fuser and gzip to archive the entire history t

Re: 'read' primitive

2008-08-22 Thread Dave B
Bob Proulx wrote: > To get the entire line verbatim you would need to use the $REPLY > variable. Or also use IFS= read -r foo < bar -- D.

edit-and-execute-command (C-xC-e) doesn't use FCEDIT env variable

2008-08-22 Thread Francis Moreau
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-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -