Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Something rotten in tar completion
On Dec 2, 5:26pm, Peter Stephenson wrote:
}
} Turns out it was recursive-files. I had that set for my "src"
} subdirectory, which was a bit daft since it's got to search through any old
} clutter to find a completion for a bare file name. Removing that
} removes the wait.
}
} Would still be nice to be able to kill it...
In the most recent _main_complete, the message on the interrupt should
tell you where it was:
trap 'zle -M "Killed by signal in ${funcstack[1]} after ${SECONDS}s";
Getting that $funcstack name might be helpful. In the meantime, it does
not seem useful to regenerate the recursive listing for every directory
in the recursive-files style:
diff --git a/Completion/Unix/Type/_files b/Completion/Unix/Type/_files
index 0f6fcd6..049b49c 100644
--- a/Completion/Unix/Type/_files
+++ b/Completion/Unix/Type/_files
@@ -121,9 +121,11 @@ for def in "$pats[@]"; do
if _path_files -g "$pat" "$opts[@]" "$expl[@]"; then
ret=0
elif [[ $PREFIX$SUFFIX != */* ]] && zstyle -a ":completion:${curcontext}:$tag" recursive-files rfiles; then
+ local subtree
+ subtree=( **/*(/) )
for rfile in $rfiles; do
if [[ $PWD/ = ${~rfile} ]]; then
- for prepath in **/*(/); do
+ for prepath in $subtree; do
oprefix=$PREFIX
PREFIX=$prepath/$PREFIX
_path_files -g "$pat" "$opts[@]" "$expl[@]" && ret=0
--
Barton E. Schaefer
Messages sorted by:
Reverse Date,
Date,
Thread,
Author