Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zsh bash compatibility question
- X-seq: zsh-users 13008
- From: William Scott <wgscott@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: zsh bash compatibility question
- Date: Wed, 9 Jul 2008 10:05:10 -0700
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi Citizens:
I've got a file that I want users to be able to source from either zsh
or bash
If, while in zsh, I type
source /whole/path/to/sourcefile
and have dirname $0 embedded within the sourcefile
In zsh, it will report back the full directory path for the directory
in which this file is located, the same way it does for shell scripts.
In bash, I just get the location of the bash executable itself.
Is there an equivalent command that will work in bash (or preferably
both shells)?
Thanks.
Bill Scott
Messages sorted by:
Reverse Date,
Date,
Thread,
Author