Comments for bash programmable completion

08 Dec 2002 06:24 tomkm

~/.bash_completion
Hi

In the documentation for bash_completion it says that to add local completions they should go in ~/.bash_completion . What format should they be in?

Cheers

03 Dec 2002 10:47 strange

Re: gdb
A change to the completion of gdb that i forgot to submit earlier:

change echo core* \ to compgen -f core* ;

27 Nov 2002 07:30 xayk

rsync suport
is rsync suport available and if not does anyone know when it will be?

regards
p.s.
i love bash completion :)
the only thing i wouldn't want it to support is password completion :))

15 Oct 2002 20:06 ianmacd

Re: gdb

> % % BTW, it would be nice, when nothing
> % % matches, to have it revert to old
> style.
> % You can get this by replacing:
> % [ $have ] && complete -F _gdb
> $filenames gdb
> % with:
> % [ $have ] && complete -F _gdb
> $default gdb
>
> Thanks, but I wasn't thinking about gdb
> in particular, but in the whole system.
> So that "tar cvzf something", bzip2,
> etc, could fallback to simple
> filecompletion when nothing else
> matches.


Unfortunately, there's no easy way of achieving this in bash.

15 Oct 2002 19:58 strange

Re: gdb

>
> % There's a "core *" missing
> Why 'core.*' instead of 'core*'?

core.* was a typo, the right thing to put is core*, of course.

> % BTW, it would be nice, when nothing
> % matches, to have it revert to old style.
> You can get this by replacing:
> [ $have ] && complete -F _gdb $filenames gdb
> with:
> [ $have ] && complete -F _gdb $default gdb

Thanks, but I wasn't thinking about gdb in particular, but in the whole system. So that "tar cvzf something", bzip2, etc, could fallback to simple filecompletion when nothing else matches.

15 Oct 2002 19:45 ianmacd

Re: gdb

> There's a "core *" missing in
> gdb:
> @line 2595
> + COMPREPLY=( $( compgen
> -W "$( echo core.* $( ps axo
> comm,pid |


Why 'core.*' instead of 'core*'?


> BTW, it would be nice, when nothing
> matches, to have it revert to old style.
> It's more annoying this way.


You can get this by replacing:

[ $have ] && complete -F _gdb $filenames gdb

with:

[ $have ] && complete -F _gdb $default gdb

15 Oct 2002 18:10 strange

gdb
There's a "core *" missing in gdb:
@line 2595
+ COMPREPLY=( $( compgen -W "$( echo core.* $( ps axo comm,pid |

BTW, it would be nice, when nothing matches, to have it revert to old style. It's more annoying this way.

14 Oct 2002 11:01 aweber

Re: Problem with java -classpath completion

> Sorry. Make that i=i+1 into i=$((i+1)).


Better works i=$i+1
Thx

10 Oct 2002 21:05 ianmacd

Re: Problem with java -classpath completion

> % 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.
>
>
> After replacing the i++ in line 3077
> with i=i+1 it results in the folowing
> error:
>
> bash: ((: i+1: expression recursion
> level exceeded (error token is "i+1")


Sorry. Make that i=i+1 into i=$((i+1)).

10 Oct 2002 07:28 aweber

Re: Problem with java -classpath completion
Hi,

> Which version of bash is this? Hit C-x
> C-v to get the version number.

It's version:
GNU bash, version 2.05b.0(1)-release (i586-suse-linux)

> 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.


After replacing the i++ in line 3077 with i=i+1 it results in the folowing error:

bash: ((: i+1: expression recursion level exceeded (error token is "i+1")

But after full removal of the statement it worked like expected.

Thx for support!

Alex :)

Screenshot

Project Spotlight

ReciJournal

An open, cross-platform journaling program.

Screenshot

Project Spotlight

Veusz

A scientific plotting package.