zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh workers <zsh-workers@sunsite.dk>
Subject: Re: Bug#236350: zsh: _prefix completer broken?
Date: Sat, 6 Mar 2004 23:32:46 +0000	[thread overview]
Message-ID: <1040306233246.ZM6321@candle.brasslantern.com> (raw)
In-Reply-To: <4419.1078596182@trentino.logica.co.uk>

On Mar 6,  7:03pm, Oliver Kiddle wrote:
} Subject: Re: Bug#236350: zsh: _prefix completer broken?
}
} > zstyle ':completion:*' completer \
} >   _oldlist _expand _complete _match _ignored _approximate _prefix
} > 
} > However, 4.2.0-pre-3 never gets beyond trying _approximate.
} 
} This is the bug I reported in 17846.

Aha.

} For now, I moved _prefix before _approximate.

I still think the trap behavior is wrong, but as a stopgap we can do this:

Index: Completion/Base/Completer/_approximate
===================================================================
--- _approximate	7 Jan 2002 15:18:19 -0000	1.5
+++ _approximate	6 Mar 2004 23:26:05 -0000
@@ -65,7 +65,7 @@
 
     builtin compadd "$_correct_expl[@]" "$@"
   }
-  trap 'unfunction compadd' EXIT INT
+  trap 'local _x=$?; unfunction compadd; ((! $_x))' EXIT INT
 fi
 
 _comp_correct=1

This won't work in general because (( )) can only return 1 or 0, not
some arbitrary exit code, but it's fine for _approximate.


  reply	other threads:[~2004-03-06 23:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1AzKUu-0003tz-00@techloaner2.idiomtech.com>
2004-03-06  1:35 ` Clint Adams
2004-03-06 16:05   ` Andrew Pimlott
2004-03-06 17:38     ` Bart Schaefer
2004-03-06 17:59       ` Bart Schaefer
2004-03-06 18:03       ` Oliver Kiddle
2004-03-06 23:32         ` Bart Schaefer [this message]
2004-03-08 10:41         ` Peter Stephenson

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=1040306233246.ZM6321@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --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).