Comments for bash programmable completion

09 Oct 2002 11:52 ianmacd

Re: Problem with java -classpath completion

> in the 20021007 I'm getting the
> following error if I try to use
> <TAB> after "java
> -classpath" :
>
> bash: i++: command not found
>
> Is there somthing wrong on my system, of
> is it a typo in bash-completion?


Which version of bash is this? Hit C-x C-v to get the version number. The 'i++' in question is in a C-style 'for' loop. You could replace it with 'i=i+1' if your version of bash doesn't support the increment operator.

09 Oct 2002 07:53 aweber

Problem with java -classpath completion
Hi there,

in the 20021007 I'm getting the following error if I try to use <TAB> after "java -classpath" :

bash: i++: command not found

Is there somthing wrong on my system, of is it a typo in bash-completion?

Thx for the great proggi!

Alex :)

08 Oct 2002 01:51 ianmacd

Re: option -i in ssh

> bash completion is great. Only one thing
> left I would like to see:
> when using options like -i in ssh tab
> completion doesn't work.
> I need somthing like this very often:
> ssh -i .ssh/ident<TAB> host
> to user another ssh-key pair.
>
> thanks for this good peace of code!


OK, I've added this feature to the code. It'll be in the next release.

20 Aug 2002 04:49 andquick

option -i in ssh
bash completion is great. Only one thing left I would like to see:
when using options like -i in ssh tab completion doesn't work.
I need somthing like this very often:
ssh -i .ssh/ident<TAB> host
to user another ssh-key pair. Unfortunately <tab> then is ignored. May be I did not configured this correct!?

thanks for this good peace of code!

03 Jul 2002 20:25 Ullerup

Re: Great hack, but ...

> 1. I get lots of error messages from
> function names beginning with
> "_" when I execute some Bourne
> shell programs. For instance, when just
> invoke `sh' I get:


I had the same problem and found that I had "set -o allexport" set in my .bash_profile. Make sure you aren't executing that or executing "set -a" in any of your bash related files.

05 Jun 2002 19:20 ianmacd

Re: great, but...

> this is a great project. but why gives
> me e.g.:
>
> "cd /ho" -> "cd /home
> " (with a space after it!)
>
> and not "cd /home/" as
> expected? i have suse 8.0.


See the TROUBLESHOOTING section of the README file. You are using an unpatched bash 2.05. There's an official patch to fix this behaviour; or you could just upgrade bash to 2.05a.

05 Jun 2002 18:49 dieterweb

great, but...
this is a great project. but why gives me e.g.:

"cd /ho" -> "cd /home " (with a space after it!)

and not "cd /home/" as expected? i have suse 8.0.

dieterweb

16 May 2002 14:03 ianmacd

Re: Or you could just use zsh. or both

> That's a nice thought ("can't we
> all get along?"), but actually,
> bash is popular just because it's the
> default. There is almost no respect in
> which bash is actually better than zsh.


For one thing, bash is almost entirely Bourne shell compatible, which makes it the preferred shell scripting environment for a great many people for whom this is an important issue.


> This is not a troll; zsh really is
> better in almost every way, but many
> people are used to bash and unwilling to
> try something new. This is fine, it's
> their choice; inertia is the way of the
> world.


Unwilling and sometimes unable. Time is a critical factor in the lives of IT people when deciding which technologies they should chase down and master.

Once someone knows a given tool really well, there has to be a demonstrable incentive to switch to a similar tool. Even if that incentive is given, not everyone has the time to become fluent in another shell environment.

If you were a junior sysadmin and already knew bash fairly well, would it be better to learn zsh next or Perl? I'd argue that you'd be better off spending your time learning Perl.


> My only real complaint with this
> project is that it presents all this
> completion magic as if it were a new
> idea.


This simply isn't true. I acknowledge that zsh has had this for years. Heck, Chet based the completion functionality in bash on that of zsh.


> A better description would be
> "adding completion features to bash
> tcsh, zsh, and other shells have both
> had for years now", rather than
> advertising as if they're introducing
> something novel into the world.


They are novel in the bash world, since they've only been around for a couple of years.

As for tcsh, I don't accept that it has equivalent functionality to bash in regard to completion. You can't bind arbitrary functions to commands, for example, which is an extremely useful thing to be able to do.

16 May 2002 13:25 egnor

Re: Or you could just use zsh. or both

> bla mine is better, no mine.... no no
> no MINE, or all of them
>
>
> all shells have their advantages.
> geez.
> why would bash be so popular if it
> sucks so much you all say.
>
>


That's a nice thought ("can't we all get along?"), but actually, bash is popular just because it's the default. There is almost no respect in which bash is actually better than zsh. This is not a troll; zsh really is better in almost every way, but many people are used to bash and unwilling to try something new. This is fine, it's their choice; inertia is the way of the world.

My only real complaint with this project is that it presents all this completion magic as if it were a new idea. A better description would be "adding completion features to bash tcsh, zsh, and other shells have both had for years now", rather than advertising as if they're introducing something novel into the world. But that's a minor quibble.

13 May 2002 06:47 roryh

Re: Great hack, but ...
It's just a wild guess, but does the same thing happen if you invoke your shell as 'bash' instead of 'sh'? I believe that by invoking bash as 'sh' it runs in sh-compatibility mode, which could prevent the advanced bash features from functioning.

Just a guess.

Screenshot

Project Spotlight

ReciJournal

An open, cross-platform journaling program.

Screenshot

Project Spotlight

Veusz

A scientific plotting package.