From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh list <zsh-workers@sunsite.dk>
Subject: Re: another file completion problem in 4.3.9-dev-2
Date: Sat, 02 May 2009 07:54:55 -0700 [thread overview]
Message-ID: <090502075455.ZM29259@torch.brasslantern.com> (raw)
In-Reply-To: <18939.51080.161444.80368@gargle.gargle.HOWL>
On May 2, 12:09am, Greg Klanderman wrote:
}
} Here's another file completion problem in 4.3.9-dev-2:
}
} | [~] greg@lwm| zsh -f
} | lwm% echo $ZSH_VERSION
} | 4.3.9-dev-2
} | lwm% echo $ZSH_PATCHLEVEL
} | 1.4662
} | lwm% rm .zcompdump
} | lwm% autoload -U compinit
} | lwm% compinit -u
} | lwm% zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' '+ l:|=* r:|=*'
} | lwm% mkdir temp
} | lwm% cd temp
} | lwm% touch BarBaz
}
} Now if I try to complete "ls baz", I get nothing.
}
} But if I complete "ls az", it does correctly complete to "ls BarBaz".
Hmm. The default completers only include _complete and _ignored. In
order to get the behavior you want, I also have to allow corrections:
zstyle ':completion:*' completer _complete _ignored _approximate
"baz" is a mismatch in at least two dimensions, both position in the
word (not a prefix) and case. I suspect the matcher list can adjust
for only one dimension at a time.
On the other hand, the following DOES seem to be a bug, so maybe it
is related somehow:
torch% autoload -U compinit
torch% compinit -D -u
torch% setopt no_case_glob
torch% ls -la
total 88
drwx------ 2 schaefer schaefer 4096 May 2 06:47 .
drwxrwxrwt 27 root root 69632 May 2 07:15 ..
-rw-rw-r-- 1 schaefer schaefer 0 May 2 06:47 BarBaz
torch% ls ba<TAB>
(no result). Setting no_case_glob is supposed to cause file completion
to be applied case-insensitively even if there is no matcher-list, but
compfiles -p tmp1 accex '' ' m:{a-zA-Z}={A-Za-z}' '' fake '*'
(line 409 in _path_files) doesn't return any matches in tmp1.
Sigh. Some documentation (at least in comments) for the functions in
computils.c would really have been helpful.
next prev parent reply other threads:[~2009-05-02 14:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-02 4:09 Greg Klanderman
2009-05-02 14:54 ` Bart Schaefer [this message]
2009-05-03 16:56 ` Greg Klanderman
2009-05-03 18:03 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=090502075455.ZM29259@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).