zsh-workers
 help / color / mirror / code / Atom feed
* global alias with leading space gives unexpected thing
@ 2010-04-27 21:41 Dmitry Bolshakov
  2010-04-27 22:02 ` Mikael Magnusson
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Bolshakov @ 2010-04-27 21:41 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-28  8:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-27 21:41 global alias with leading space gives unexpected thing Dmitry Bolshakov
2010-04-27 22:02 ` Mikael Magnusson
2010-04-28  8:56   ` Peter Stephenson

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).