From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11124 invoked by alias); 15 Dec 2013 21:05:39 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32117 Received: (qmail 18175 invoked from network); 15 Dec 2013 21:05:34 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=5fxMpiYJc9auRCuJoIU/Lq/HPexMimfnP7O9ectAeyg=; b=cUDbPD3GyJy+FG2KFMXtxDShAo2RykTfnFF5j46uhe/W6S453/nDT7OagrIv5pG0P6 osx8rRWZy7o/0RWL+0nYRkKD14EFen6IVMitZw3plvxBoxNRemG4BXAt3YN31S3eB7EA CUNyYz84amHweglDerxSyK3xmZlWRuV1ygIg1k7GWX8okqKKsUhpLHZAdSRjjIebqdBq lwjGnZN9wHj+SbCkZioUBrbARIlSarIArgqoQ6lLJWTBP45lKUP8Vz9th9cZstNkVXjG 28TU1qcO4BAmK6LWTgrcy8NOB4BYd13E8hX58GUdFm+vnR94ThBmbS1reOZk0HBqS0OO tvsw== X-Gm-Message-State: ALoCoQmeGWFsRZSQeAEU4iKs2yNs7xjdqGQZdLPoO9sT+dL08nUwlV6RznMa9Qe457hHJcEjKE+8 X-Received: by 10.180.149.175 with SMTP id ub15mr11053259wib.44.1387139904111; Sun, 15 Dec 2013 12:38:24 -0800 (PST) X-ProxyUser-IP: 86.6.157.246 Date: Sun, 15 Dec 2013 20:38:21 +0000 From: Peter Stephenson To: Zsh Hackers' List Subject: Re: brace in alias name and compsys Message-ID: <20131215203821.1c3f2b69@pws-pc.ntlworld.com> In-Reply-To: <131215115236.ZM20467@torch.brasslantern.com> References: <20131215073603.GA97197@redoubt.spodhuis.org> <131215115236.ZM20467@torch.brasslantern.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 15 Dec 2013 11:52:36 -0800 Bart Schaefer wrote: > While we're on the subject, completing after "[" or "[[" in command > position (no intervening whitespace) incorrectly attempts subscript > completion. This appears to be a bug somewhere in the internals, > because compstate[context] has been set to 'subscript' and there's no > assignment to that in _complete_debug output. I think it's something like this. diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index e30e0b1..6ed4a0e 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -1505,7 +1505,11 @@ get_comp_string(void) else nnb = s; for (tt = s; tt < s + zlemetacs_qsub - wb;) { - if (*tt == Inbrack) { + /* + * Ignore '[' at the start of a command as it's not + * matched by a closing bracket. + */ + if (*tt == Inbrack && (tt != s || !lincmd)) { i++; nb = nnb; ne = tt; -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/