From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5956 invoked by alias); 7 Mar 2015 22:17:23 -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: 34682 Received: (qmail 29830 invoked from network); 7 Mar 2015 22:17:18 -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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, T_FSL_HELO_BARE_IP_2 autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1425766278; bh=pKcOZBo7oyG/VFIXZ0MzzTd30y8BgLhbbEx5GpnkGqk=; h=From:To:Subject:Date; b=IQ9YRxCSePWDmu1L7xbT0AQJzcXbRqgCzNObGpisiGSrgc28FS4N7/R69ZIOJWhOX EirTBcvVPKXtwVpR+ic/mTW3pKS86hPX0IENyQngWpgqsOMZhf6UaDwKuNCZQ8sDul /NcLBrM5WrXWxHLtp5Khv4iWcbyo7woKA5e89k5U= From: ZyX To: zsh-workers Subject: [BUG] Alias with unclosed quote leaves incorrect string in history MIME-Version: 1.0 Message-Id: <5524431425766277@web26o.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Sun, 08 Mar 2015 01:11:17 +0300 Content-Transfer-Encoding: 7bit Content-Type: text/plain Given the following input: =================================== % alias -g S='"' % echo S abc def S dquote> " abc def S % =================================== if I press Up now it will show =================================== % echo S" abc def S " =================================== which is the original string + a quote after first `S` which is wrong. Second S also does not end the string, but I do not think this is a bug. Tested on zsh -f with zsh-5.0.7-r2 (-r2 is an ebuild version, modified with patch from https://bugs.gentoo.org/show_bug.cgi?id=538684) and commit 0e319ecadc86a589c9f28819efae9e0bf972ee1b. Same thing will happen if I e.g. have unclosed `$(` or `'` in an alias. I think it is more correct to deal with this problem by errorring out when user tries to use such an alias.