From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16963 invoked from network); 23 Mar 2001 13:58:08 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 Mar 2001 13:58:08 -0000 Received: (qmail 14796 invoked by alias); 23 Mar 2001 13:57:43 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13730 Received: (qmail 14785 invoked from network); 23 Mar 2001 13:57:42 -0000 Date: Fri, 23 Mar 2001 14:57:42 +0100 (MET) Message-Id: <200103231357.OAA07854@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.dk In-reply-to: Peter Stephenson's message of Fri, 23 Mar 2001 10:47:43 +0000 Subject: PATCH: Re: Correction of files after ~/ Peter Stephenson wrote: > ... > > Here's edited highlights --- I don't have time to look at this at the > moment. I'm trying to complete ~/src/zsh/Completion/Usr which should turn > the last part into User. This is the part of the plot from where it > correctly tries the path with one approximation up to where it gives up and > tries it with two approximations. It works fine if I replace ~ with > /home/pws. > > Same behaviour with zsh -f with the single style > zstyle ':completion:*' completer _oldlist _expand _complete _approximate > which is what I normally use. Indeed. There certainly once was a reason for that special casing in _approximate's compadd(). But it seems to work now. I don't remember why I did that -- and the C-code has changed since then. Let's try. Bye Sven Index: Completion/Core/_approximate =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Core/_approximate,v retrieving revision 1.5 diff -u -r1.5 _approximate --- Completion/Core/_approximate 2000/05/19 08:26:47 1.5 +++ Completion/Core/_approximate 2001/03/23 13:57:01 @@ -53,11 +53,12 @@ [[ ${argv[(I)-[a-zA-Z]#U[a-zA-Z]#]} -eq 0 && "${#:-$PREFIX$SUFFIX}" -le _comp_correct ]] && return - if [[ "$PREFIX" = \~*/* ]]; then - PREFIX="${PREFIX%%/*}/(#a${_comp_correct})${PREFIX#*/}" - else + ### This distinction doesn't seem to be needed anymore + # if [[ "$PREFIX" = \~*/* ]]; then + # PREFIX="${PREFIX%%/*}/(#a${_comp_correct})${PREFIX#*/}" + # else PREFIX="(#a${_comp_correct})$PREFIX" - fi + # fi builtin compadd "$_correct_expl[@]" "$@" } fi -- Sven Wischnowsky wischnow@informatik.hu-berlin.de