This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: File name completion broken in 1.7.7?


On 11/5/2010 10:13 AM, Andy Hall wrote:
> I have recently upgraded to 1.7.7 from 1.5.X.  In 1.5.X, it used to be that
> in bash I could type lines like
> 
> 	P4 edit hydra_c
> 
> and hit the tab key to complete the file name.  A command like
> 
> 	p4 edit hydra_config
> 
> would be then executed.   
> 
> In 1.7.7, when I type
> 
> 	P4 edit hydra_c
> 
> and hit the tab key to complete the file name, I get the text "bash:
> _get_comp_words_by_ref(): `preprev': unknown argument"
> followed by the missing part of the filename.

I believe the bash-completion package is installed. It includes
/etc/bash_completion.d/p4 which is causing your problems. The version of
bash-completion included with 1.5 was not enabled by default, but the
current version is. This is why the problem surfaced with 1.7. (Note
that it has nothing to do with the Cygwin version but the version of
bash-completion instead.)

You can uninstall the bash-completion package if you don't want it at
all (which is probably true since you hadn't enabled it in 1.5) or
remove the /etc/bash_completion.d/p4 file.

(Personally, I created a /etc/bash_completion.d/disabled directory and
moved the files I didn't want there, for performance. I suspect I'll
have to manually repeat this every time I update bash-completion. There
may be a better "official" way to disable parts of bash-completion.)

-- 
David Rothenberger  ----  daveroth@acm.org

Finagle's First Law:
        If an experiment works, something has gone wrong.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]