zsh-users
 help / color / mirror / code / Atom feed
* $0 in function
@ 2001-10-01  5:00 Joakim Ryden
  2001-10-01  5:05 ` Sweth Chandramouli
  2001-10-01  5:09 ` Phil Pennock
  0 siblings, 2 replies; 6+ messages in thread
From: Joakim Ryden @ 2001-10-01  5:00 UTC (permalink / raw)
  To: zsh-users

I have a simple catch-all error function like so:

function print_error() {

        echo "$0: an error ocurred"
        echo -e "check buildlog: $BUILD_LOG for more information\n"
        exit 1
}

In bash this prints on error:
./build_apache: an error ocurred.
check buildlog: /home/jo/www/build.log for more information
In zsh it prints:
print_error: an error ocurred. 
check buildlog: /home/jo/www/build.log for more information

Is there an option I need to (un)set to emulate the bash behaviour in
this instance?

Thanks!
Jo


^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: $0 in function
@ 2001-10-01  5:25 Joakim Ryden
  2001-10-01  5:34 ` Sweth Chandramouli
  0 siblings, 1 reply; 6+ messages in thread
From: Joakim Ryden @ 2001-10-01  5:25 UTC (permalink / raw)
  To: Phil Pennock; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 269 bytes --]

Hmm, thanks. Is function_argzero supposed to show up in the setopt list?

% setopt
interactive
monitor
shinstdin
zle
% setopt function_argzero
% setopt
interactive
monitor
shinstdin
zle

(and the function still prints the same thing as before)

--Jo


[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 2187 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: $0 in function
@ 2001-10-01  5:38 Joakim Ryden
  0 siblings, 0 replies; 6+ messages in thread
From: Joakim Ryden @ 2001-10-01  5:38 UTC (permalink / raw)
  To: Sweth Chandramouli, zsh-users

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

Thanks Sweth - nevermind, it helps to have your terminal windows
straight at 1:30 in the am - it's all good. :)

--Jo


-----Original Message-----
From:	Sweth Chandramouli
Sent:	Mon 10/1/2001 1:34 AM
To:	zsh-users@sunsite.dk
Cc:	
Subject:	Re: $0 in function



[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 2155 bytes --]

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

end of thread, other threads:[~2001-10-01  5:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-01  5:00 $0 in function Joakim Ryden
2001-10-01  5:05 ` Sweth Chandramouli
2001-10-01  5:09 ` Phil Pennock
2001-10-01  5:25 Joakim Ryden
2001-10-01  5:34 ` Sweth Chandramouli
2001-10-01  5:38 Joakim Ryden

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