bug-bash
[Top][All Lists]
Advanced

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

in completion, $COMP_WORDBREAKS should be ignored, unless there are no m


From: Vincent Lefevre
Subject: in completion, $COMP_WORDBREAKS should be ignored, unless there are no matches
Date: Wed, 23 May 2012 13:11:27 +0200
User-agent: Mutt/1.5.21-6203-vl-r48020 (2012-04-29)

It seems that $COMP_WORDBREAKS annoys users when filenames contain
one of its characters:
  http://lists.gnu.org/archive/html/bug-bash/2005-07/msg00034.html
  http://lists.gnu.org/archive/html/bug-bash/2006-09/msg00019.html
  http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00163.html
and my bug report:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=674084

Unsetting $COMP_WORDBREAKS is not a solution, as completion would no
longer work in contexts where such characters are word separators.

How about the following behavior when the user types [TAB]?

1. Try to complete the whole word, ignoring $COMP_WORDBREAKS.
2. If there are no matches, take $COMP_WORDBREAKS into account
   like now.

I suppose that false positives for (1) are rare enough, so that this
heuristic would work well in practice.

-- 
Vincent Lefèvre <address@hidden> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



reply via email to

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