auto completion problem

Brian Dessent brian@dessent.net
Mon Sep 5 16:59:00 GMT 2005


yosi wrote:

> I am using cygwin on a win-2k OS.
> I am working using bash xterms (I start them with startx command).
> on those xterms auto completion from history doesn't work.
> 
> I am familiar with the solaris equivalent. In solaris pressing tab or ESC+P will
> cause the shell to complete the command if the prefix matches a previous command
> in the history.
> 
> Is there any way I can make this work on cygwin?

The default behavior of bash is for TAB to complete filenames, not
commands.  Additionally, it will not do anything if there is more than
one match unless you press TAB twice.

You can change all of this in the ~/.inputrc file though -- see "man
readline".  For what it's worth I have the following in mine, among many
other things:

set completion-ignore-case On
set show-all-if-ambiguous On
"\e[5~": history-search-backward
"\e[6~": history-search-forward

The first two cause completion to not be case sensitive, and to not
require a double keystroke to list the possible choices for filename
completion.  The latter two cause PageUp and PageDown to search the
command history for a completion of what has been typed so far.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list