[Top][All Lists]

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

Re: More efficient tramp-handle-file-name-all-completions

From: Julian Scheid
Subject: Re: More efficient tramp-handle-file-name-all-completions
Date: Fri, 14 Aug 2009 11:33:26 +1200

"(\\cd %s 2>&1 && (%s %s -a 2>/dev/null"
;; `ls' with wildcard might fail with `Argument
;; list too long' error in some corner cases; if
;; `ls' fails after `cd' succeeded, chances are
;; that's the case, so let's retry without
;; wildcard.  This will return "too many" entries
;; but that isn't harmful.
" || %s -a 2>/dev/null)"

Actually, cd succeeding and ls failing can also be simply due to no
wildcard matches so this will do a full ls more often than not.

The downside is obviously that attempting to complete on non-existing
prefixes becomes slow (well, as slow as it was before the patch.)

On the upside, I just realized that introduction of wildcards breaks
case insensitive completion... and this "bug" un-breaks it :-)

Anyway, the above comment needs to be fixed and this is one more
reason to look into using find/perl.

reply via email to

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