zsh-workers
 help / color / mirror / code / Atom feed
From: Dmitry Bolshakov <bdimych@narod.ru>
To: zsh-workers@zsh.org
Subject: global alias with leading space gives unexpected thing
Date: Wed, 28 Apr 2010 01:41:24 +0400	[thread overview]
Message-ID: <44891272404484@web144.yandex.ru> (raw)

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


             reply	other threads:[~2010-04-27 21:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27 21:41 Dmitry Bolshakov [this message]
2010-04-27 22:02 ` Mikael Magnusson
2010-04-28  8:56   ` 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=44891272404484@web144.yandex.ru \
    --to=bdimych@narod.ru \
    --cc=zsh-workers@zsh.org \
    /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).