Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: rm somefile<tab> completion issues



Sven Joachim <svenjoac@xxxxxx> writes:

> On 2009-07-10 22:49 +0200, Peter Stephenson wrote:
> 
> > On 10 Jul 2009 13:34:42 -0700
> > Philippe Troin <phil@xxxxxxxx> wrote:
> >> Now if I type this:
> >> % ls a<TAB>
> >> 
> >> The completion offers both 'a' and 'ab'.
> >> 
> >> Now to my issue:
> >> % rm a<TAB>
> >> 
> >> And 'ab' is completed with 'a' being proposed.
> >
> > Do you mean it goes straight to showing "ab" on the command line on the
> > first <TAB>?
> >
> > The possibilities are limited since you're using zsh -f, but /etc/zshenv
> > might hold the key, or there might be a rogue completion file in fpath.
> > Could rm be an alias for something?
> 
> I suspect Philippe is experiencing http://bugs.debian.org/517448.

Thank you.

That was indeed the fix.

For reference, the patch is:

--- zsh-4.3.9.orig/Completion/Unix/Command/_rm
+++ zsh-4.3.9/Completion/Unix/Command/_rm
@@ -34,7 +34,7 @@
   (file)
     declare -a ignored
     ignored=(${line//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH})
-    _path_files -F ignored && ret=0
+    _files -F ignored && ret=0
     ;;
 esac

I assume this is in CVS ;) 

Phil.



Messages sorted by: Reverse Date, Date, Thread, Author