mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-04 10:41:11 +02:00
zsh-workers/8322
This commit is contained in:
parent
42510013b1
commit
eb85a72ad9
2 changed files with 9 additions and 3 deletions
|
@ -277,7 +277,12 @@ for prepath in "$prepaths[@]"; do
|
|||
# otherwise this would keep `_files' from completing all filenames
|
||||
# if none of the patterns match.
|
||||
|
||||
if [[ "$haspats" = no && -z "$tpre$tsuf" &&
|
||||
if [[ -z "$tpre$tsuf" ]]; then
|
||||
tmp1=( "$tmp2[@]" )
|
||||
addsfx=(-S '')
|
||||
remsfx=()
|
||||
break;
|
||||
elif [[ "$haspats" = no && -z "$tpre$tsuf" &&
|
||||
"$pre" = */ && -z "$suf" ]]; then
|
||||
PREFIX="${opre}${osuf}"
|
||||
SUFFIX=""
|
||||
|
|
|
@ -7835,7 +7835,7 @@ cut_cline(Cline l)
|
|||
q = p;
|
||||
}
|
||||
if (!e && q && !q->orig && !q->olen && (q->flags & CLF_MISS) &&
|
||||
(q->word ? q->wlen : q->llen) < 3) {
|
||||
!(q->flags & CLF_MATCHED) && (q->word ? q->wlen : q->llen) < 3) {
|
||||
q->word = q->line = NULL;
|
||||
q->wlen = q->llen = 0;
|
||||
}
|
||||
|
@ -8452,7 +8452,8 @@ do_single(Cmatch m)
|
|||
if (m->flags & CMF_PARNEST)
|
||||
havesuff = 1;
|
||||
}
|
||||
if ((m->flags & CMF_FILE) || (partest && isset(AUTOPARAMSLASH))) {
|
||||
if (((m->flags & CMF_FILE) || (partest && isset(AUTOPARAMSLASH))) &&
|
||||
cs > 0 && line[cs - 1] != '/') {
|
||||
/* If we have a filename or we completed a parameter name *
|
||||
* and AUTO_PARAM_SLASH is set, lets see if it is a directory. *
|
||||
* If it is, we append a slash. */
|
||||
|
|
Loading…
Reference in a new issue