Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

$0 in function



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



Messages sorted by: Reverse Date, Date, Thread, Author