From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8950 invoked from network); 3 Aug 2000 13:31:51 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Aug 2000 13:31:51 -0000 Received: (qmail 7988 invoked by alias); 3 Aug 2000 13:31:22 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12503 Received: (qmail 7981 invoked from network); 3 Aug 2000 13:31:16 -0000 Date: Thu, 3 Aug 2000 15:30:56 +0200 (MET DST) Message-Id: <200008031330.PAA22832@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Tanaka Akira's message of 03 Aug 2000 20:47:09 +0900 Subject: Re: PATCH: Re: completion problem with filename including # (and pathmax stuff) Tanaka Akira wrote: > Thanks. > > > + tmp1=( ${tmp1//(#b)([][()|*?^#~<>])/\\${match[1]}} ) > > I tried test some special characters other than # and found that > and > \ has a problem. Rats. I had tried some others, too, but missed (inter alia) these two. > Z(2):akr@flux% Src/zsh -f > flux% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst > flux% mkdir -p '>aa/bb' '\cc/dd' > flux% ls -ld '>aa' '\cc' > drwxr-xr-x 3 akr akr 512 Aug 3 20:46 >aa > drwxr-xr-x 3 akr akr 512 Aug 3 20:46 \cc > flux% ls \>a > flux% ls \\c > > They completes nothing. > > Although I tried to change the character range to [][()|*?^#~<\\], the > problem is not fixed. It's *much* worse: % ls bb % a='\<*' b='\>*' % echo $~a /dev/null +\\])/\\$match[1]} )' 2>/dev/null else exp=( ${exp:s/\\\$/\$} ) fi @@ -77,7 +77,7 @@ # Now try globbing. [[ "$force" = *g* ]] || zstyle -T ":completion:${curcontext}:" glob && - eval 'exp=( ${~exp} )' 2>/dev/null + eval 'exp=( ${~exp} ); exp=( ${exp//(#b)([][()|*?^#~<>\\])/\\${match[1]}} )' 2>/dev/null # If we don't have any expansions or only one and that is the same # as the original string, we let other completers run. Index: Completion/Core/_main_complete =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Core/_main_complete,v retrieving revision 1.39 diff -u -r1.39 _main_complete --- Completion/Core/_main_complete 2000/07/27 10:59:44 1.39 +++ Completion/Core/_main_complete 2000/08/03 13:29:13 @@ -16,7 +16,7 @@ # which makes the output of setopt and unsetopt reflect a different # state than the global one for which you are completing. -setopt localoptions nullglob rcexpandparam extendedglob +setopt localoptions nullglob rcexpandparam extendedglob noshglob unsetopt markdirs globsubst shwordsplit nounset ksharrays exec ])/\\${match[1]}} ) + tmp1=( ${tmp1//(#b)([][()|*?^#~<>\\])/\\${match[1]}} ) tmp2="${(M)tpre##((.|..|)/)##}" if [[ -n "$tmp2" ]]; then skipped="/$tmp2" Index: Completion/Core/compdump =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Core/compdump,v retrieving revision 1.7 diff -u -r1.7 compdump --- Completion/Core/compdump 2000/07/04 16:17:00 1.7 +++ Completion/Core/compdump 2000/08/03 13:29:13 @@ -14,7 +14,7 @@ # to see if auto-dump should re-dump the dump-file. emulate -L zsh -setopt extendedglob +setopt extendedglob noshglob typeset _d_file _d_f _d_bks _d_line _d_als _d_files Index: Src/glob.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/glob.c,v retrieving revision 1.9 diff -u -r1.9 glob.c --- Src/glob.c 2000/06/02 10:09:13 1.9 +++ Src/glob.c 2000/08/03 13:29:14 @@ -2388,6 +2388,7 @@ case ')': if (isset(SHGLOB)) break; + case '>': case '^': case '#': case '~': Index: Src/Modules/parameter.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/parameter.c,v retrieving revision 1.13 diff -u -r1.13 parameter.c --- Src/Modules/parameter.c 2000/08/02 14:20:42 1.13 +++ Src/Modules/parameter.c 2000/08/03 13:29:15 @@ -1465,9 +1465,9 @@ #endif if (!(val = getstrvalue(&v)) || *val != '/' || #ifdef HAVE_PATHCONF - strlen(val) >= PATH_MAX) -#else ((strlen(val) >= pathmax)) && pathmax != -1) +#else + strlen(val) >= PATH_MAX) #endif zwarn("invalid value: %s", val, 0); else -- Sven Wischnowsky wischnow@informatik.hu-berlin.de