Programmable completion in Bash?

Programmable completion in Bash?

Post by Robert Seege » Sun, 24 May 1998 04:00:00



One of the most useful features in tcsh is the ability to use
programmable completion. For example, telling the shell that the command
'cd' should only be completed with directory names. Does anyone know if
Bash has such a feature and, if not, are there any plans on implementing
such?

If this question should be sent to a different group, feel free to let
me know.

Thanks for any help,
Robert Seeger

 
 
 

Programmable completion in Bash?

Post by Michael Po » Mon, 25 May 1998 04:00:00


On Sat, 23 May 1998 19:41:34 -0400, Robert Seeger


>One of the most useful features in tcsh is the ability to use
>programmable completion. For example, telling the shell that the command
>'cd' should only be completed with directory names. Does anyone know if
>Bash has such a feature and, if not, are there any plans on implementing
>such?

Hmm, well, there are various commands that differentiate types of
completion.  For example, ESC-/ does filename completion, ESC-~ does
username completion, ESC-$ does variable completion.  And so on.
These are all listed in the Bash man page.

mp

--

Portland Chess Club:  http://www.rdrop.com/users/pcc
Listowner:  trollope-l, "Anthony Trollope and his Contemporaries"
            nwchess-l, "The Northwest Chess Discussion List"

 
 
 

Programmable completion in Bash?

Post by Peter Samuels » Mon, 25 May 1998 04:00:00



Quote:> One of the most useful features in tcsh is the ability to use
> programmable completion. For example, telling the shell that the
> command 'cd' should only be completed with directory names. Does
> anyone know if Bash has such a feature and, if not, are there any
> plans on implementing such?

No it doesn't and yes there are.  From the bash-2.02 FAQ:

    39) What's coming in future versions?

    These are features I plan to include in a future version of bash.

    a bash de* (a minimally-tested version is included with bash-2.02)
    Programmable completion a la zsh

I'm looking forward to this, as its completions are the only reason I
still use a shell with csh syntax.

--
Peter Samuelson
<sampo.creighton.edu ! psamuels>

 
 
 

Programmable completion in Bash?

Post by Christian Weisgerb » Mon, 25 May 1998 04:00:00




> One of the most useful features in tcsh is the ability to use
> programmable completion. For example, telling the shell that the command
> 'cd' should only be completed with directory names. Does anyone know if
> Bash has such a feature

It doesn't as of 2.02. Check out zsh if you'd like a shell with
programmable completion and (k)sh-like syntax.

Quote:> and, if not, are there any plans on implementing such?

From the bash FAQ, which is regularly posted to this group and
news.answers: (and I suspect has been posted since you asked the last
time):

--------------->
39) What's coming in future versions?

These are features I plan to include in a future version of bash.

a bash de* (a minimally-tested version is included with bash-2.02)
Programmable completion a la zsh
<---------------

--

  See another pointless homepage at <URL:http://www.veryComputer.com/~naddy/>.

 
 
 

Programmable completion in Bash?

Post by Ollivier Rober » Tue, 26 May 1998 04:00:00


[courtesy cc of this posting sent to cited author via email]



> I'm looking forward to this, as its completions are the only reason I
> still use a shell with csh syntax.

Zsh's programmable completion is as powerful as tcsh's one. Except for one
detail: it is not case-insensitive.
--

FreeBSD FAQ: <URL:http://www.FreeBSD.org/FAQ/>
 
 
 

Programmable completion in Bash?

Post by robe » Wed, 27 May 1998 04:00:00



 >I'm looking forward to this, as its completions are the only reason I
 >still use a shell with csh syntax.

Why not use the zsh instead? It's much better than the tcsh (completion-
and otherwise) and claims to be compatible with ksh/sh.

                                                                  robert

 
 
 

1. Bash programmable completion: a tutorial

Programmable completion is a useful feature present in Bash (and other
shells).  It allows you to use contextual information to greatly extend
the range of situations in which you can use completion (i.e. get Bash
to fill in arguments for you when you hit Tab).  This can significantly
speed up your work.

The Bash documentation on this feature is not terribly easy to read,
so a tutorial may be helpful to many.  There's one now available at
http://www.captaincrumb.com/docs/computing/bash/progcomp/

2. Newbie question : which embedded Linux?

3. Programmable completion in bash 2.05b

4. Why bother using Crack

5. Programmable completion in bash >=2.04

6. CMU Flite 1.1: small footprint text-to-speech synthesizer

7. bash 2.04 programmable completion examples

8. POST breakout?

9. bash 2.04 programmable completion example?

10. bash programmable completion question

11. BASH BASH BASH BASH BASH BASH BASH BASH BASH BASH

12. Setting up completion and possible completion in BASH

13. programmable completion