From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28609 invoked from network); 4 Aug 2000 21:53:02 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Aug 2000 21:53:02 -0000 Received: (qmail 29206 invoked by alias); 4 Aug 2000 21:52:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12538 Received: (qmail 29189 invoked from network); 4 Aug 2000 21:52:49 -0000 To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: Re: completion problem with filename including # (and pathmax stuff) References: <200008031330.PAA22832@beta.informatik.hu-berlin.de> MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 05 Aug 2000 06:51:33 +0900 In-Reply-To: <200008031330.PAA22832@beta.informatik.hu-berlin.de> (Sven Wischnowsky's message of "Thu, 3 Aug 2000 15:30:56 +0200 (MET DST)") Message-ID: User-Agent: T-gnus/6.14.1 (based on Gnus v5.8.3) (revision 16) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.6 (i686-pc-linux-gnu) MULE/4.0 (HANANOEN) In article <200008031330.PAA22832@beta.informatik.hu-berlin.de>, Sven Wischnowsky writes: > Rats. I had tried some others, too, but missed (inter alia) these two. \ has the problem yet. Z(2):akr@flux% Src/zsh -f flux% bindkey -e; autoload -U compinit; compinit -D flux% mkdir -p '\ab/cd' flux% ls \\ This completes nothing. I made a test to check this problem and found other problems. flux% mkdir -p '=ab/cd' flux% ls \= _path_files:327: * not found Note that the completion with = behaves curiously as follows. flux% ls ./= flux% ls ./\=ab/ flux% ls ./=ab/cd/ Also note that metafied characters (0x83 to 0x9c) is printed in metafied form. The test is follows but I'll not commit it because I feel it's too slow. It spends over two minutes on my machine until first test (0x00 - 0x7f) is failed. Index: 53completion.ztst =================================================================== RCS file: /cvsroot/zsh/zsh/Test/53completion.ztst,v retrieving revision 1.7 diff -u -r1.7 53completion.ztst --- 53completion.ztst 2000/07/17 10:36:00 1.7 +++ 53completion.ztst 2000/08/04 21:33:47 @@ -13,8 +13,61 @@ touch file1 touch file2 + cd dir1 + setopt braceccl + dirs=() + for x in {0-9a-f}{0-9a-f} + do + if [[ $x == 00 || $x == 2f ]]; then continue; fi + eval "ch=\$'\\x$x'" + dirs=("$dirs[@]" "./${ch}ab") + done + mkdir $dirs ${^dirs}/cd + cd .. + + special_character_test() { + sp_input='' + sp_output='' + for x in "$@" # {0-9a-f}{0-9a-f} + do + eval "ch=\$'\\x$x'" + case $x in + 00|2f) continue;; # filename cannot contain `\0' or `/'. + 09) ch_input=$'\\\C-v'"$ch" ch_output="\\$ch";; + 0a) continue;; # cannot input `\n'. + 0[1-8b-f]|1[0-9a-f]|7f) ch_input=$'\C-v'"$ch" ch_output="$ch";; + 2[012346789a]|3[bcdef]|5[bcde]|60|7[bcde]) ch_input="\\$ch" ch_output="\\$ch";; + *) ch_input="$ch" ch_output="$ch";; + esac + sp_input="$sp_input: $ch_input"$'\t\t\C-u' + sp_output="${sp_output}line: {: ${ch_output}ab/}{}"$'\n'"line: {: ${ch_output}ab/cd/}{}"$'\n' + done + } + + special_character_test {0-7}{0-9a-f} + sp_input1="$sp_input" + sp_output1="$sp_output" + + special_character_test {89a-f}{0-9a-f} + sp_input2="$sp_input" + sp_output2="$sp_output" + %test + # stty is required to input C-c, C-q and C-s. + comptesteval $'stty intr "" stop "" start ""' + comptesteval $'cd dir1' + comptest "$sp_input1" + echo +0q:filename with special characters (0x00 - 0x7f) +>$sp_output1 + + comptest "$sp_input2" + echo +0q:filename with special characters (0x80 - 0xff) +>$sp_output2 + + comptesteval 'cd ..' comptest $': \t\t\t\t\t\t\t' 0:directories and files >line: {: }{} -- Tanaka Akira