From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7049 invoked by alias); 27 Apr 2010 21:55:41 -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: 27928 Received: (qmail 22634 invoked from network); 27 Apr 2010 21:55:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.yandex.ru designates 95.108.130.119 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1272404485; bh=3fDetE3EMS9f19aDMtI6OF/beT5z/9byaAJmVG+xzks=; h=From:To:Subject:MIME-Version:Message-Id:Date: Content-Transfer-Encoding:Content-Type; b=FRXlIVe+kIpS8j/hPOJa7QeHQKNO+HMY6GnPylPX20HnODmqLEzgkJ6F8zUSSwQHg dhJ1aw5fnXARUPDHd6biLrrRJB+9lpLL5AIdowiW6YfOsGy7e4BB95RSvQMaev2r1+ KW4B/1p4wub7oboSN23iVuVlCT93+9EbDeg++RJM= X-Yandex-Spam: 1 X-Yandex-Front: web144.yandex.ru X-Yandex-TimeMark: 1272404485 From: Dmitry Bolshakov To: zsh-workers@zsh.org Subject: global alias with leading space gives unexpected thing MIME-Version: 1.0 Message-Id: <44891272404484@web144.yandex.ru> Date: Wed, 28 Apr 2010 01:41:24 +0400 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain hi there it is, copy-paste this into the shell ==================================================== setopt histignorespace : ---------- if there is leading space in the alias alias -g X=' >/dev/null' true X history -1 : ---------- then the command with the alias is absent in the history : ---------- if no leading space alias -g X='>/dev/null' true X history -1 : ---------- then the command is present : ---------- if leading space, but the histignorespace is off alias -g X=' >/dev/null' setopt no_histignorespace true X history -1 : ---------- then also present ==================================================== this seems strange a bit for me i always imagined that a count of spaces does not matter all somecommand >/dev/null somecommand >/dev/null somecommand >/dev/null are the same, isn't it so? -- with best regards Dmitry Bolshakov