From: Jim <linux.tech.guy@gmail.com>
To: zsh-users@zsh.org
Subject: Only shell that doesn't return "shell name".
Date: Mon, 21 Aug 2017 03:13:36 -0500 [thread overview]
Message-ID: <CA+rB6GLmfnUnnfQ+bBBQz10_NBe-nmLgaxHiBO-uJ-o8uRmA6A@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 866 bytes --]
Hi all,
I was using the following one line script to check out how the
"."(dot) command worked in different shells.
echo "\$0: $0"
The file was not executable( -rw-r--r-- ) and to be consistent I always
used the same command.
. ./<filename>
The shells tested along with output of script:
ash -- $0: ash
bash -- $0: bash
busybox sh -- $0: sh
dash -- $0: dash
ksh -- $0: ksh
mksh -- $0: mksh
sh -- $0: sh My distribution, by default, links sh to bash
sh -- $0: sh With sh linked to zsh
zsh -- $0: ./filename
Not that I mind that zsh returns the filename, it is just inconsistent
with all other shells I tested and the way zsh works when emulating sh.
So far searches have not returned any information that tells me if this
should be the normal behaviour.
Q: Is this the way zsh should behave?
Thanks,
Jim
next reply other threads:[~2017-08-21 8:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 8:13 Jim [this message]
2017-08-22 1:30 ` Martijn Dekker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+rB6GLmfnUnnfQ+bBBQz10_NBe-nmLgaxHiBO-uJ-o8uRmA6A@mail.gmail.com \
--to=linux.tech.guy@gmail.com \
--cc=linuxtechguy@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).