zsh-users
 help / color / mirror / code / Atom feed
* zsh book?
@ 2003-11-17 15:34 Miek Gieben
  2003-11-17 17:50 ` Peter Stephenson
  0 siblings, 1 reply; 11+ messages in thread
From: Miek Gieben @ 2003-11-17 15:34 UTC (permalink / raw)
  To: zsh users

Hello,

I was browsing through all the zsh documentation and ML archives. And I 
thought is there no zsh book available? 'O Reilly doesn't have one, and
even with google I can not find anything.

I only saw one reference in the ML archives about someone asking input
for a zsh book.

Does anybody know if there is something in the works (somewhere).

grtz
      Miek

PS yes I could print it all out, or read it from my screen, but I kinda
   like books :-)

--
Serenity now!
-- Frank Costanza (Seinfeld)


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

* Re: zsh book?
  2003-11-17 15:34 zsh book? Miek Gieben
@ 2003-11-17 17:50 ` Peter Stephenson
  2003-11-17 19:01   ` Nikolai Weibull
                     ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Peter Stephenson @ 2003-11-17 17:50 UTC (permalink / raw)
  To: Miek Gieben; +Cc: zsh users

Miek Gieben wrote:
> Hello,
> 
> I was browsing through all the zsh documentation and ML archives. And I 
> thought is there no zsh book available? 'O Reilly doesn't have one, and
> even with google I can not find anything.
> 
> I only saw one reference in the ML archives about someone asking input
> for a zsh book.
> 
> Does anybody know if there is something in the works (somewhere).

Yes, Jerry Peek, Oliver and I are collaborating on a book to be
published by Apress sometime, I imagine, in the first half of next
year.  We may be asking for informal reviewers at some point, though the
text probably needs drawing together a bit before then.

I think Apress are planning to announce its official forthcomingness in
December.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


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

* Re: zsh book?
  2003-11-17 17:50 ` Peter Stephenson
@ 2003-11-17 19:01   ` Nikolai Weibull
  2003-11-17 21:30   ` Miek Gieben
  2003-11-18 19:05   ` zsh vs ksh William H. Magill
  2 siblings, 0 replies; 11+ messages in thread
From: Nikolai Weibull @ 2003-11-17 19:01 UTC (permalink / raw)
  To: zsh users

* Peter Stephenson <pws@csr.com> [Nov, 17 2003 19:00]:
> Yes, Jerry Peek, Oliver and I are collaborating on a book to be
> published by Apress sometime, I imagine, in the first half of next
> year.  We may be asking for informal reviewers at some point, though the
> text probably needs drawing together a bit before then.
awesome!  that's a definite buy,
	nikolai

--
::: name: Nikolai Weibull    :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA    :: loc atm: Gothenburg, Sweden    :::
::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}


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

* Re: zsh book?
  2003-11-17 17:50 ` Peter Stephenson
  2003-11-17 19:01   ` Nikolai Weibull
@ 2003-11-17 21:30   ` Miek Gieben
  2003-11-18 19:05   ` zsh vs ksh William H. Magill
  2 siblings, 0 replies; 11+ messages in thread
From: Miek Gieben @ 2003-11-17 21:30 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh users

[On 17 Nov, @18:50, Peter wrote in "Re: zsh book? ..."]
> Miek Gieben wrote:
> > Hello,
> > 
> > I was browsing through all the zsh documentation and ML archives. And I 
> > thought is there no zsh book available? 'O Reilly doesn't have one, and
> > even with google I can not find anything.
> > 
> > I only saw one reference in the ML archives about someone asking input
> > for a zsh book.
> > 
> > Does anybody know if there is something in the works (somewhere).
> 
> Yes, Jerry Peek, Oliver and I are collaborating on a book to be
> published by Apress sometime, I imagine, in the first half of next
> year.  We may be asking for informal reviewers at some point, though the
> text probably needs drawing together a bit before then.
> 
> I think Apress are planning to announce its official forthcomingness in
> December.

cool :-) 

I you need reviewers let me know. I'm fairly new to zsh (though not to Linux),
so i'm glad to review it, try it out and learn more about zsh in the process :-)

grtz Miek


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

* zsh vs ksh
  2003-11-17 17:50 ` Peter Stephenson
  2003-11-17 19:01   ` Nikolai Weibull
  2003-11-17 21:30   ` Miek Gieben
@ 2003-11-18 19:05   ` William H. Magill
  2003-11-19 17:00     ` Peter Stephenson
  2003-11-19 17:02     ` Miek Gieben
  2 siblings, 2 replies; 11+ messages in thread
From: William H. Magill @ 2003-11-18 19:05 UTC (permalink / raw)
  To: zsh users

Here's a question...

What is the reasonable way to determine if the contents of a .profile 
are being read by zsh or bash?

Especially when using zsh to emulate ksh.

There are sufficient differences between the zsh and bash that certain 
items need to be used with one, but not the other.

T.T.F.N.
William H. Magill
# Beige G3 - Rev A motherboard - 768 Meg
# Flat-panel iMac (2.1) 800MHz - Super Drive - 768 Meg
# PWS433a [Alpha 21164 Rev 7.2 (EV56)- 64 Meg]- Tru64 5.1a
magill@mcgillsociety.org
magill@acm.org
magill@mac.com


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

* Re: zsh vs ksh
  2003-11-18 19:05   ` zsh vs ksh William H. Magill
@ 2003-11-19 17:00     ` Peter Stephenson
  2003-11-19 17:02     ` Miek Gieben
  1 sibling, 0 replies; 11+ messages in thread
From: Peter Stephenson @ 2003-11-19 17:00 UTC (permalink / raw)
  To: zsh users

"William H. Magill" wrote:
> What is the reasonable way to determine if the contents of a .profile 
> are being read by zsh or bash?
> 
> Especially when using zsh to emulate ksh.

  [ x$ZSH_VERSION != x ]

works even in ksh emulation.  If you're not paranoid about old versions
of bash, and your sure there isn't a more basic sh lying around, you can
use the more natural

  [[ -n $ZSH_VERSION ]]

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


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

* Re: zsh vs ksh
  2003-11-18 19:05   ` zsh vs ksh William H. Magill
  2003-11-19 17:00     ` Peter Stephenson
@ 2003-11-19 17:02     ` Miek Gieben
  2003-12-04 12:04       ` zzapper
  2005-01-08  5:18       ` zsh as ksh for login shell -- a bug with PS1? William H. Magill
  1 sibling, 2 replies; 11+ messages in thread
From: Miek Gieben @ 2003-11-19 17:02 UTC (permalink / raw)
  To: zsh users

[On 18 Nov, @20:05, William wrote in "zsh vs ksh ..."]
> Here's a question...
> 
> What is the reasonable way to determine if the contents of a .profile 
> are being read by zsh or bash?

trying something out on the commandline I see:

bash:  echo $BASH	-> /bin/bash
zsh:   echo $BASH	-> <empty>

So maybe you can use that?

grtz
      Miek
--
Serenity now!
-- Frank Costanza (Seinfeld)


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

* Re: zsh vs ksh
  2003-11-19 17:02     ` Miek Gieben
@ 2003-12-04 12:04       ` zzapper
  2005-01-08  5:18       ` zsh as ksh for login shell -- a bug with PS1? William H. Magill
  1 sibling, 0 replies; 11+ messages in thread
From: zzapper @ 2003-12-04 12:04 UTC (permalink / raw)
  To: zsh-users


>
>bash:  echo $BASH	-> /bin/bash
>zsh:   echo $BASH	-> <empty>
>
>So maybe you can use that?
>
also :
echo $SHELL

zzapper
--

vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


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

* zsh as ksh for login shell -- a bug with PS1?
  2003-11-19 17:02     ` Miek Gieben
  2003-12-04 12:04       ` zzapper
@ 2005-01-08  5:18       ` William H. Magill
  2005-01-08 16:24         ` Peter Stephenson
  1 sibling, 1 reply; 11+ messages in thread
From: William H. Magill @ 2005-01-08  5:18 UTC (permalink / raw)
  To: zsh users

This is under FreeBSD 5.3 on an Alpha XP1000;
Zsh version zsh 4.2.1 (alpha-portbld-freebsd6.0)

/usr/local/bin/zsh is sym-linked to /usr/local/bin/ksh
both are in /etc/shells.

I have a two-line prompt string

PS1='[$PWD] $me
  $HOST> '

I have been using this for many years. It works fine under ksh on Tru64 
Unix 5.1 and when zsh 4.2.1 itself is evoked as the login shell.

However, if I change the /etc/password entry to evoke ksh instead of 
zsh, the newline is lost, resulting in a prompt consisting of "$HOST> "

Use of single or double quotes makes no difference.
I've tried it with and without "set -o PROMPT_SUBST" and note no change.
I've tried it using \n instead of a "real" newline without effect. (\n 
winds up in the prompt string.)

Set displays PS1 as the string containing the newline. It is only the 
actual prompt itself which does not contain the newline, only the 
second line of output.

There is clearly a difference in between the performance of zsh and zsh 
as ksh.

Is this a bug with zsh?

T.T.F.N.
William H. Magill
# Beige G3 [Rev A motherboard - 300 MHz 768 Meg] OS X 10.2.8
# Flat-panel iMac (2.1) [800MHz - Super Drive - 768 Meg] OS X 10.3.7
# PWS433a [Alpha 21164 Rev 7.2 (EV56)- 64 Meg] Tru64 5.1a
# XP1000  [Alpha 21264-3 (EV6) - 256 meg] FreeBSD 5.3
# XP1000  [Alpha 21264-A (EV 6.7) - 384 meg] FreeBSD 5.3
magill@mcgillsociety.org
magill@acm.org
magill@mac.com
whmagill@gmail.com


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

* Re: zsh as ksh for login shell -- a bug with PS1?
  2005-01-08  5:18       ` zsh as ksh for login shell -- a bug with PS1? William H. Magill
@ 2005-01-08 16:24         ` Peter Stephenson
  2005-01-08 16:50           ` William H. Magill
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Stephenson @ 2005-01-08 16:24 UTC (permalink / raw)
  To: zsh users

"William H. Magill" wrote:
> I have a two-line prompt string
> 
> PS1='[$PWD] $me
>   $HOST> '
> 
> I have been using this for many years. It works fine under ksh on Tru64 
> Unix 5.1 and when zsh 4.2.1 itself is evoked as the login shell.
> 
> However, if I change the /etc/password entry to evoke ksh instead of 
> zsh, the newline is lost, resulting in a prompt consisting of "$HOST> "

I think you're saying that ksh is really a link to zsh.  In that case
zsh will start up with a different set of options.  Probably the
critical one in this case is single_line_zle.  Try "unsetopt
single_line_zle" and see if that works.  (If my experiment is correct
this is exactly the problem.)

The option isn't there for the prompt, in fact, it's there because ksh
doesn't handle multiple line editing buffers.  It so happens that in zsh
this is associated with a multi-line prompt.  However, it's not at all
clear we really need to enforce this restriction of ksh when emulating
it anyway.  It's hard to think of a case where it's an advantage.

-- 
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
Work: pws@csr.com
Web: http://www.pwstephenson.fsnet.co.uk


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

* Re: zsh as ksh for login shell -- a bug with PS1?
  2005-01-08 16:24         ` Peter Stephenson
@ 2005-01-08 16:50           ` William H. Magill
  0 siblings, 0 replies; 11+ messages in thread
From: William H. Magill @ 2005-01-08 16:50 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh users

On 08 Jan, 2005, at 11:24, Peter Stephenson wrote:
> "William H. Magill" wrote:
>> I have a two-line prompt string
>>
>> PS1='[$PWD] $me
>>   $HOST> '
>>
>> I have been using this for many years. It works fine under ksh on 
>> Tru64
>> Unix 5.1 and when zsh 4.2.1 itself is evoked as the login shell.
>>
>> However, if I change the /etc/password entry to evoke ksh instead of
>> zsh, the newline is lost, resulting in a prompt consisting of "$HOST> 
>> "
>
> I think you're saying that ksh is really a link to zsh.  In that case
> zsh will start up with a different set of options.  Probably the
> critical one in this case is single_line_zle.  Try "unsetopt
> single_line_zle" and see if that works.  (If my experiment is correct
> this is exactly the problem.)

Yes, ksh is a link to zsh.

"unsetopt single_line_zle" did the trick!

Profuse thanks....

> The option isn't there for the prompt, in fact, it's there because ksh
> doesn't handle multiple line editing buffers.  It so happens that in 
> zsh
> this is associated with a multi-line prompt.  However, it's not at all
> clear we really need to enforce this restriction of ksh when emulating
> it anyway.  It's hard to think of a case where it's an advantage.

I'm not certain I completely understand your comment, but from 
experience with various actual implementations of ksh, there is no 
restriction on two line prompts. Similarly, I find no restriction 
mentioned in the "Korn Shell" book by Bolsky and Korn.


T.T.F.N.
William H. Magill
# Beige G3 [Rev A motherboard - 300 MHz 768 Meg] OS X 10.2.8
# Flat-panel iMac (2.1) [800MHz - Super Drive - 768 Meg] OS X 10.3.7
# PWS433a [Alpha 21164 Rev 7.2 (EV56)- 64 Meg] Tru64 5.1a
# XP1000  [Alpha 21264-3 (EV6) - 256 meg] FreeBSD 5.3
# XP1000  [Alpha 21264-A (EV 6.7) - 384 meg] FreeBSD 5.3
magill@mcgillsociety.org
magill@acm.org
magill@mac.com
whmagill@gmail.com


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

end of thread, other threads:[~2005-01-08 16:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-17 15:34 zsh book? Miek Gieben
2003-11-17 17:50 ` Peter Stephenson
2003-11-17 19:01   ` Nikolai Weibull
2003-11-17 21:30   ` Miek Gieben
2003-11-18 19:05   ` zsh vs ksh William H. Magill
2003-11-19 17:00     ` Peter Stephenson
2003-11-19 17:02     ` Miek Gieben
2003-12-04 12:04       ` zzapper
2005-01-08  5:18       ` zsh as ksh for login shell -- a bug with PS1? William H. Magill
2005-01-08 16:24         ` Peter Stephenson
2005-01-08 16:50           ` William H. Magill

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