Re: cd --help should output the complete man page

2011-04-11 Thread Matias A. Fonzo
> > Faheem Mitha wrote: > >> $ cd --help >> bash: cd: --: invalid option >> cd: usage: cd [-L|-P] [dir] >> >> I'm don't even know how to get the usage output without >> inducing an error. > > Does "help cd" do the trick? > No. ''help cd'' does the trick. Regards, Matias.

Re: exported variable and tab

2011-03-28 Thread Matias A. Fonzo
> On 03/28/2011 06:56 PM, Matias A. Fonzo wrote: >> >> I have bash 4.2.8(2)-release with readline 6.2 running on GNU/Linux. >> >> I've exported a variable and when I press TAB, the result is a >> backslash. >> For example, with the case of the $HOME vari

exported variable and tab

2011-03-28 Thread Matias A. Fonzo
Hi there, I have bash 4.2.8(2)-release with readline 6.2 running on GNU/Linux. I've exported a variable and when I press TAB, the result is a backslash. For example, with the case of the $HOME variable: $ mkdir $HOME/test $ cd $HOME/test The result is: cd \$HOME/test Instead of showing the f

Re: bash exit command should be unconditional

2010-04-08 Thread Matias A. Fonzo
If I am right when you invoke bash as "/bin/sh" (/bin/sh -> bash). Bash runs in POSIX mode. > I certainly have chosen the subject wrong, but I don't want to start a new > thread now. Please let me backpedal a bit and describe the problem I am > trying to solve. > > A company I work for is trying t

Re: best way to test for empty dir?

2009-12-15 Thread Matias A. Fonzo
On Tue, 15 Dec 2009 15:23:33 +0100 Andreas Schwab wrote: > "Matias A. Fonzo" writes: > > > On Tue, 15 Dec 2009 10:37:36 +0100 > > Andreas Schwab wrote: > > > >> "Matias A. Fonzo" writes: > >> > >> > On Mon, 14 D

Re: best way to test for empty dir?

2009-12-15 Thread Matias A. Fonzo
On Tue, 15 Dec 2009 10:37:36 +0100 Andreas Schwab wrote: > "Matias A. Fonzo" writes: > > > On Mon, 14 Dec 2009 12:21:12 + > > Marc Herbert wrote: > > > >> Matias A. Fonzo a écrit : > >> > On Fri, 11 Dec 2009 16:16:13 + >

Re: best way to test for empty dir?

2009-12-14 Thread Matias A. Fonzo
On Mon, 14 Dec 2009 12:21:12 + Marc Herbert wrote: > Matias A. Fonzo a écrit : > > On Fri, 11 Dec 2009 16:16:13 + > > Marc Herbert wrote: > > >> In case anyone is interested my winner (so far) is: > >> > >> exists() > >> { > >

Re: best way to test for empty dir?

2009-12-12 Thread Matias A. Fonzo
On Sat, 12 Dec 2009 10:51:31 +0100 Andreas Schwab wrote: > "Matias A. Fonzo" writes: > > > A solution to check the broken symlink is: > > > > [ -e "foo" -o -L "foo" -a ! -e "foo" ] > > In which way is the last check not re

Re: best way to test for empty dir?

2009-12-11 Thread Matias A. Fonzo
gt; The -L is redundant. Because, if the symlink is not broken, the regular file "exists" ( -e ). A solution to check the broken symlink is: [ -e "foo" -o -L "foo" -a ! -e "foo" ] > if exists foo/*; then > for f in foo/*; do > ... > done > fi > > > -- Matias A. Fonzo

Re: best way to test for empty dir?

2009-12-10 Thread Matias A. Fonzo
ydir"/* [[ -f $1 ]] && echo non-empty || echo empty; References: [1] http://www.issociate.de/board/goto/866027/checking_if_a_directory_is_empty.html -- Matias A. Fonzo

Re: Command substitution reduce spaces even in strings

2009-12-08 Thread Matias A. Fonzo
On Tue, 08 Dec 2009 14:01:23 +0100 ma...@fiz15.jupiter.vein.hu wrote: > 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'