Mention useful readline settings, like show-all-if-ambiguous. Suggested by
Richard Neill <rn214@hermes.cam.ac.uk>.
This commit is contained in:
parent
f6acf2d134
commit
64ebb33510
38
README
38
README
@ -1,4 +1,4 @@
|
|||||||
$Id: README,v 1.24 2006/02/25 01:38:32 ianmacd Exp $
|
$Id: README,v 1.25 2006/02/25 14:39:51 ianmacd Exp $
|
||||||
|
|
||||||
|
|
||||||
INSTALLATION
|
INSTALLATION
|
||||||
@ -154,14 +154,15 @@ Q. The bash completion code inhibits some commands from completing on
|
|||||||
the files that I need to?
|
the files that I need to?
|
||||||
|
|
||||||
A. No. Use M-/ to (in the words of the man page) attempt file name
|
A. No. Use M-/ to (in the words of the man page) attempt file name
|
||||||
completion on the text before the cursor. This will circumvent any
|
completion on the text to the left of the cursor. This will
|
||||||
file type restrictions put in place by the bash completion code.
|
circumvent any file type restrictions put in place by the bash
|
||||||
|
completion code.
|
||||||
|
|
||||||
Q. How can I insert my own local completions without having to
|
Q. How can I insert my own local completions without having to
|
||||||
reinsert them every time you issue a new release?
|
reinsert them every time you issue a new release?
|
||||||
|
|
||||||
A. Put them in ~/.bash_completion, which is parsed at the end of the
|
A. Put them in ~/.bash_completion, which is parsed at the end of the
|
||||||
main completion script.
|
main completion script. See also the next question.
|
||||||
|
|
||||||
Q. I author/maintain package X and would like to maintain my own
|
Q. I author/maintain package X and would like to maintain my own
|
||||||
completion code for this package. Where should I put it to be sure
|
completion code for this package. Where should I put it to be sure
|
||||||
@ -170,7 +171,7 @@ Q. I author/maintain package X and would like to maintain my own
|
|||||||
Put it in the directory pointed to by $BASH_COMPLETION_DIR, which
|
Put it in the directory pointed to by $BASH_COMPLETION_DIR, which
|
||||||
is defined at the beginning of the main completion script. Any
|
is defined at the beginning of the main completion script. Any
|
||||||
scripts placed in this directory will be sourced by interactive
|
scripts placed in this directory will be sourced by interactive
|
||||||
bash shells.
|
bash shells. Usually, this is /etc/bash_completion.d.
|
||||||
|
|
||||||
Q. I use CVS in combination with passwordless ssh access to my remote
|
Q. I use CVS in combination with passwordless ssh access to my remote
|
||||||
repository. How can I have the cvs command complete on remotely
|
repository. How can I have the cvs command complete on remotely
|
||||||
@ -286,6 +287,28 @@ A. Probably because the database is being queried every time and this uses a
|
|||||||
unless it detects that the database has changed since the file was created,
|
unless it detects that the database has changed since the file was created,
|
||||||
in which case it will still use the database to ensure accuracy.
|
in which case it will still use the database to ensure accuracy.
|
||||||
|
|
||||||
|
Q. Can tab completion be made even easier?
|
||||||
|
|
||||||
|
A. The readline(3) library offers a few settings that can make tab
|
||||||
|
completion easier (or at least different) to use.
|
||||||
|
|
||||||
|
For example, try the following in your /etc/inputrc:
|
||||||
|
|
||||||
|
set show-all-if-ambiguous on
|
||||||
|
|
||||||
|
This will allow single tab completion as opposed to requiring a
|
||||||
|
double tab. This makes things much more pleasant, in my opinion.
|
||||||
|
|
||||||
|
set visible-stats on
|
||||||
|
|
||||||
|
This will suffix each returned file completion with a character
|
||||||
|
denoting its type, in a similar way to ls(1) with -F or --classify.
|
||||||
|
|
||||||
|
set page-completions off
|
||||||
|
|
||||||
|
This turns off the use of the internal pager when returning long
|
||||||
|
completion lists.
|
||||||
|
|
||||||
Q. This code is rubbish/not bad/pretty good/the best thing since
|
Q. This code is rubbish/not bad/pretty good/the best thing since
|
||||||
sliced bread. How can I show my appreciation?
|
sliced bread. How can I show my appreciation?
|
||||||
|
|
||||||
@ -307,8 +330,9 @@ A. If you're a registered Freshmeat user, you can subscribe to new release
|
|||||||
Q. Is bash the be-all-and-end-all of completion as far as shells go?
|
Q. Is bash the be-all-and-end-all of completion as far as shells go?
|
||||||
|
|
||||||
A. Absolutely not. zsh has an extremely sophisticated completion system
|
A. Absolutely not. zsh has an extremely sophisticated completion system
|
||||||
that offers many features absent from the bash implementation. More
|
that offers many features absent from the bash implementation. Its
|
||||||
information can be found at:
|
users often cannot resist pointing this out. More information can
|
||||||
|
be found at:
|
||||||
|
|
||||||
http://www.zsh.org/
|
http://www.zsh.org/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user