zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.dk
Subject: PATCH: Re: Correction of files after ~/
Date: Fri, 23 Mar 2001 14:57:42 +0100 (MET)	[thread overview]
Message-ID: <200103231357.OAA07854@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Peter Stephenson's message of Fri, 23 Mar 2001 10:47:43 +0000


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


             reply	other threads:[~2001-03-23 13:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-23 13:57 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-03-23  9:53 Sven Wischnowsky

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=200103231357.OAA07854@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --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).