* Re: WELCOME to zsh-users@sunsite.dk [not found] <1234561091.502.ezmlm@sunsite.dk> @ 2009-02-13 21:58 ` Frank Jeschke 2009-02-13 22:01 ` Frank Terbeck 0 siblings, 1 reply; 6+ messages in thread From: Frank Jeschke @ 2009-02-13 21:58 UTC (permalink / raw) To: zsh-users [-- Attachment #1: Type: text/plain, Size: 439 bytes --] Hi there, my zsh shows strange behavior I don't understand and doesn't find on google. When typing a command line comment it out and hit enter the I get the following: sss@kyag:[~]$ #vim /tmp/foo zsh: command not found: #vim jes@kyag:[~]$ zsh --version zsh 4.3.4 (i686-pc-linux-gnu) zsh 4.3.2 shows the same behavior. Does anyone know why this happens? Is this known behavior? How can I get rid of it? Frank -- [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: WELCOME to zsh-users@sunsite.dk 2009-02-13 21:58 ` WELCOME to zsh-users@sunsite.dk Frank Jeschke @ 2009-02-13 22:01 ` Frank Terbeck 2009-02-14 9:28 ` Comments in ZLE kba 0 siblings, 1 reply; 6+ messages in thread From: Frank Terbeck @ 2009-02-13 22:01 UTC (permalink / raw) To: zsh-users Frank Jeschke <jes@hostis.de>: > my zsh shows strange behavior I don't understand and doesn't find on > google. When typing a command line comment it out and hit enter the I > get the following: > > sss@kyag:[~]$ #vim /tmp/foo > zsh: command not found: #vim > jes@kyag:[~]$ zsh --version > zsh 4.3.4 (i686-pc-linux-gnu) > > zsh 4.3.2 shows the same behavior. > > Does anyone know why this happens? Is this known behavior? How can I > get rid of it? % man zshoptions | less -p INTERACTIVE_COM Regards, Frank -- In protocol design, perfection has been reached not when there is nothing left to add, but when there is nothing left to take away. -- RFC 1925 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Comments in ZLE 2009-02-13 22:01 ` Frank Terbeck @ 2009-02-14 9:28 ` kba 2009-02-14 10:02 ` Frank Terbeck 0 siblings, 1 reply; 6+ messages in thread From: kba @ 2009-02-14 9:28 UTC (permalink / raw) To: zsh-users On Fri, Feb 13, 2009 at 11:01:37PM +0100, Frank Terbeck wrote: > Frank Jeschke <jes@hostis.de>: > > my zsh shows strange behavior I don't understand and doesn't find on > > google. When typing a command line comment it out and hit enter the I > > get the following: > > > > sss@kyag:[~]$ #vim /tmp/foo > > zsh: command not found: #vim > > jes@kyag:[~]$ zsh --version > > zsh 4.3.4 (i686-pc-linux-gnu) > > > > zsh 4.3.2 shows the same behavior. > > > > Does anyone know why this happens? Is this known behavior? How can I > > get rid of it? > > % man zshoptions | less -p INTERACTIVE_COM > > Regards, Frank I shared Frank's confusion until I recently stumbled over the INTERACTIVE_COM option by accident. Is there a specific reason why this is off by default? To avoid clashes with commands that start with '#'? Can '#' be used to do history expansion like '!' or something like this? ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Comments in ZLE 2009-02-14 9:28 ` Comments in ZLE kba @ 2009-02-14 10:02 ` Frank Terbeck 2009-02-14 10:05 ` Mikael Magnusson 2009-02-14 18:55 ` Bart Schaefer 0 siblings, 2 replies; 6+ messages in thread From: Frank Terbeck @ 2009-02-14 10:02 UTC (permalink / raw) To: zsh-users kba <unixprog@googlemail.com>: > On Fri, Feb 13, 2009 at 11:01:37PM +0100, Frank Terbeck wrote: > > Frank Jeschke <jes@hostis.de>: [...] > > > sss@kyag:[~]$ #vim /tmp/foo > > > zsh: command not found: #vim [...] > > > > % man zshoptions | less -p INTERACTIVE_COM > > I shared Frank's confusion until I recently stumbled over the > INTERACTIVE_COM option by accident. Is there a specific reason why this It's actually INTERACTIVE_COMMENTS. I was too lazy to type it out. Less's -p option just wants a pattern to search for, so that was enough. :-) > is off by default? To avoid clashes with commands that start with '#'? Well, I'd guess it's been done to let people use the hash char without needing to quote it. After all, who really uses comments in interactive mode? (yeah, I know some people do. But they can just use said option.) > Can '#' be used to do history expansion like '!' or something like this? Not that I would know, why? Regards, Frank -- In protocol design, perfection has been reached not when there is nothing left to add, but when there is nothing left to take away. -- RFC 1925 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Comments in ZLE 2009-02-14 10:02 ` Frank Terbeck @ 2009-02-14 10:05 ` Mikael Magnusson 2009-02-14 18:55 ` Bart Schaefer 1 sibling, 0 replies; 6+ messages in thread From: Mikael Magnusson @ 2009-02-14 10:05 UTC (permalink / raw) To: zsh-users 2009/2/14 Frank Terbeck <ft@bewatermyfriend.org>: > kba <unixprog@googlemail.com>: >> On Fri, Feb 13, 2009 at 11:01:37PM +0100, Frank Terbeck wrote: >> > Frank Jeschke <jes@hostis.de>: > [...] >> > > sss@kyag:[~]$ #vim /tmp/foo >> > > zsh: command not found: #vim > [...] >> > >> > % man zshoptions | less -p INTERACTIVE_COM >> >> I shared Frank's confusion until I recently stumbled over the >> INTERACTIVE_COM option by accident. Is there a specific reason why this > > It's actually INTERACTIVE_COMMENTS. I was too lazy to type it out. > Less's -p option just wants a pattern to search for, so that was > enough. :-) > >> is off by default? To avoid clashes with commands that start with '#'? > > Well, I'd guess it's been done to let people use the hash char without > needing to quote it. After all, who really uses comments in > interactive mode? (yeah, I know some people do. But they can just use > said option.) > >> Can '#' be used to do history expansion like '!' or something like this? > > Not that I would know, why? # can be used for lots of stuff, (foo/)# for repeating patterns, ${#foo}, ${foo#pattern}, $(( ##a )) etc etc. Note that I only know what the first one does :). -- Mikael Magnusson ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Comments in ZLE 2009-02-14 10:02 ` Frank Terbeck 2009-02-14 10:05 ` Mikael Magnusson @ 2009-02-14 18:55 ` Bart Schaefer 1 sibling, 0 replies; 6+ messages in thread From: Bart Schaefer @ 2009-02-14 18:55 UTC (permalink / raw) To: zsh-users On Feb 14, 11:02am, Frank Terbeck wrote: } Subject: Re: Comments in ZLE } } kba <unixprog@googlemail.com>: } > Is there a specific reason why this } > is off by default? To avoid clashes with commands that start with '#'? } } Well, I'd guess it's been done to let people use the hash char without } needing to quote it. Zsh was originally invented with the intention of providing a csh-like interactive experience for a Bourne-like shell language. (Among other reasons.) Csh doesn't do comments at the interactive prompt, so zsh didn't either. Remember, we're talking nigh on to 20 years ago; no Linux, and most universities had timeshared machines running 4.x BSD, so the default shell for new users was csh (not even tcsh, which is what most people mean now when they say csh). } > Can '#' be used to do history expansion like '!' or something like this? } } Not that I would know, why? Look at the HISTCHARS variable (and note that it can also be called histchars, because of course csh uses the all-lower-case format). In fact the answer to "Why does zsh do this weird thing that no other shell I ever used does?" is frequently "You're too young to know what it was like when nearly everybody's first shell exposure was csh." ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-02-14 18:55 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1234561091.502.ezmlm@sunsite.dk> 2009-02-13 21:58 ` WELCOME to zsh-users@sunsite.dk Frank Jeschke 2009-02-13 22:01 ` Frank Terbeck 2009-02-14 9:28 ` Comments in ZLE kba 2009-02-14 10:02 ` Frank Terbeck 2009-02-14 10:05 ` Mikael Magnusson 2009-02-14 18:55 ` Bart Schaefer
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).