Re: Questions about commandline-args

2011-11-12 Thread Christopher Roy Bratusek
On Saturday 12 November 2011 02:02:01 Chris F.A. Johnson wrote: > On Sat, 12 Nov 2011, Christopher Roy Bratusek wrote: > > On Friday 11 November 2011 19:32:51 Chris F.A. Johnson wrote: > >> On Fri, 11 Nov 2011, Christopher Roy Bratusek wrote: > >>> Hi list, > >>> > >>> I've got a question about co

Re: invoke tilde expansion on quoted string

2011-11-12 Thread Geir Hauge
2011/11/12 Chris F.A. Johnson > On Fri, 11 Nov 2011, Peng Yu wrote: > >> I'm wondering if I already have a string variable, is there a bash >> native to do tilde expansion on it. >> >> var='~/..' >> cd $var#how to change this line? >> > > eval "cd $var" > I'd avoid eval as that could potentiall

Why complete doesn't print anything if it is called in a bash script?

2011-11-12 Thread Peng Yu
Hi, It is strange to me why complete doesn't print anything when it is called in a bash script. I must have misunderstood some fundamentals. Does anybody know why? Thanks! ~$ cat main.sh #!/usr/bin/env bash . ~/.bashrc complete ~$ ./main.sh ~$ complete |head complete -F _kill kill complete -F

Re: Why complete doesn't print anything if it is called in a bash script?

2011-11-12 Thread Andreas Schwab
Peng Yu writes: > It is strange to me why complete doesn't print anything when it is > called in a bash script. I must have misunderstood some fundamentals. > Does anybody know why? Thanks! If complete does not print anything then there are no completions defined. Andreas. -- Andreas Schwab,

Re: Why complete doesn't print anything if it is called in a bash script?

2011-11-12 Thread Peng Yu
On Sat, Nov 12, 2011 at 10:01 AM, Andreas Schwab wrote: > Peng Yu writes: > >> It is strange to me why complete doesn't print anything when it is >> called in a bash script. I must have misunderstood some fundamentals. >> Does anybody know why? Thanks! > > If complete does not print anything then

Re: "implicit" unset of a read-only function unsets the functions

2011-11-12 Thread Chet Ramey
On 11/11/11 11:20 AM, jens.schmid...@arcor.de wrote: > Description: > If there is a read-only function f, and no variable f, > then you cannot unset function f with "unset -f f", but > you can unset it with "unset f". > > Since f is read-only, it should not be possible to

Re: Why complete doesn't print anything if it is called in a bash script?

2011-11-12 Thread Chet Ramey
On 11/12/11 10:41 AM, Peng Yu wrote: > Hi, > > It is strange to me why complete doesn't print anything when it is > called in a bash script. I must have misunderstood some fundamentals. > Does anybody know why? Thanks! Since complete happily shows completions when run from a shell script, there m

Re: Why complete doesn't print anything if it is called in a bash script?

2011-11-12 Thread Peng Yu
On Sat, Nov 12, 2011 at 10:18 AM, Chet Ramey wrote: > On 11/12/11 10:41 AM, Peng Yu wrote: >> Hi, >> >> It is strange to me why complete doesn't print anything when it is >> called in a bash script. I must have misunderstood some fundamentals. >> Does anybody know why? Thanks! > > Since complete h

Re: invoke tilde expansion on quoted string

2011-11-12 Thread Eric Blake
On 11/12/2011 07:53 AM, Geir Hauge wrote: > 2011/11/12 Chris F.A. Johnson > >> On Fri, 11 Nov 2011, Peng Yu wrote: >> >>> I'm wondering if I already have a string variable, is there a bash >>> native to do tilde expansion on it. >>> >>> var='~/..' >>> cd $var#how to change this line? >>> >> >> e

'exec

2011-11-12 Thread Paul Eggert
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/cs/ba

Re: Compile time bug with --enable-static-link option in configure

2011-11-12 Thread Chet Ramey
On 11/10/11 4:20 AM, raphael.grapi...@ac-poitiers.fr 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-u