bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: filename completion suggestions


From: Chet Ramey
Subject: Re: filename completion suggestions
Date: Thu, 7 Dec 2000 11:24:15 -0500

> when one hits TAB and is presented with the '200 etc. possibilities show all y
> or n' question,
> one should be able to hit another TAB to see them all, and not have to be 
> forced
> to
> use y.

The prompt is only presented if you exceed the default limit of 100
possible completions.  You can set the readline variable
`completion-query-items' to a larger value. 

Set the readline variable `show-all-if-ambiguous' to `on' to have
readline list the possible completions immediately.

> also the possibility list should have / * etc. appended like ls's flags can do
> to show
> directories, links, executables, etc. ... if possible...

Set the readline variable `visible-stats' to `on'.

> environment variables could optionally be part of expansion candidates
> LS_<TAB>  should expand to LS_COLORS=

Bash has a variable completion function bound to M-$ in emacs mode.

> or even better have the current value right there at the end of the
> expansion for handy editing: LS_COLORS=XXXXXXXX...

Try this, which is from my own inputrc, and change it to suit your needs:

# edit the path
"\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"

Here's another binding that allows you to edit the value of a variable
whose name is the previous word on the input line.  It may be used
immediately after completing the variable name with M-$.

"\C-xv": "\M-b\M-d\C-y=${\C-y}\M-\C-e\C-a\M-f\C-f"

Everything but the last bit is in the manual; look there for additional
details.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]