mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-04 10:41:11 +02:00
15650
This commit is contained in:
parent
91ef933eb3
commit
66576ecbf8
3 changed files with 18 additions and 5 deletions
|
@ -1,3 +1,10 @@
|
|||
2001-08-17 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 15650: Completion/Unix/Type/_path_files, Src/Zle/compcore.c: fix
|
||||
test for expanded paths in _path_files; more intelligently move
|
||||
glob flags (in particular those added by _approximate) after a
|
||||
tilde
|
||||
|
||||
2001-08-16 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 15647: Functions/Misc/zcalc: with output not showing the
|
||||
|
|
|
@ -653,7 +653,7 @@ done
|
|||
|
||||
if zstyle -t ":completion:${curcontext}:paths" expand prefix &&
|
||||
[[ nm -eq compstate[nmatches] && $#exppaths -ne 0 &&
|
||||
"$exppaths" != "$eorig" ]]; then
|
||||
"$linepath$exppaths" != "$eorig" ]]; then
|
||||
PREFIX="${opre}"
|
||||
SUFFIX="${osuf}"
|
||||
compadd -Q "$mopts[@]" -S '' -M "r:|/=* r:|=*" -p "$linepath" -a exppaths
|
||||
|
|
|
@ -1782,21 +1782,23 @@ addmatches(Cadata dat, char **argv)
|
|||
} else
|
||||
lsl = 0;
|
||||
if (dat->aflags & CAF_MATCH) {
|
||||
int ml, gfl = 0;
|
||||
int ml, gfl = 0, tildepat = 0;
|
||||
char *globflag = NULL;
|
||||
|
||||
if (comppatmatch && *comppatmatch &&
|
||||
dat->ppre && lpre[0] == '(' && lpre[1] == '#') {
|
||||
lpre[0] == '(' && lpre[1] == '#') {
|
||||
char *p;
|
||||
|
||||
for (p = lpre + 2; *p && *p != ')'; p++);
|
||||
|
||||
if (*p == ')') {
|
||||
if (*p == ')' && (dat->ppre || p[1] == '~')) {
|
||||
char sav = p[1];
|
||||
|
||||
p[1] = '\0';
|
||||
globflag = dupstring(lpre);
|
||||
gfl = p - lpre + 1;
|
||||
if (!dat->ppre)
|
||||
tildepat = 1;
|
||||
p[1] = sav;
|
||||
|
||||
lpre = p + 1;
|
||||
|
@ -1859,7 +1861,11 @@ addmatches(Cadata dat, char **argv)
|
|||
int is = (*comppatmatch == '*');
|
||||
char *tmp = (char *) zhalloc(2 + llpl + llsl + gfl);
|
||||
|
||||
if (gfl) {
|
||||
if (tildepat) {
|
||||
tmp[0] = '~';
|
||||
strcpy(tmp + 1, globflag);
|
||||
strcat(tmp, lpre + 1);
|
||||
} else if (gfl) {
|
||||
strcpy(tmp, globflag);
|
||||
strcat(tmp, lpre);
|
||||
} else
|
||||
|
|
Loading…
Reference in a new issue