From: jchaloup <jchaloup@redhat.com>
To: zsh-workers@zsh.org
Cc: fkrska@redhat.com, jchaloup@redhat.com
Subject: [PATCH] zsh.1,zshall.1: missing b emulation option in man page
Date: Mon, 02 Jun 2014 17:06:32 +0200 [thread overview]
Message-ID: <20140602150632.16888.49288.stgit@unused-4-157.brq.redhat.com> (raw)
In COMPATIBILITY section of zsh(all) man page doesn't cover that sh emulation is triggered also if the first letter of the name by which it was invoked is 'b'.
However in the code ./zsh-4.3.10/Src/options.c the intention is clear:
void
emulate(const char *zsh_name, int fully)
{
char ch = *zsh_name;
if (ch == 'r')
ch = zsh_name[1];
/* Work out the new emulation mode */
if (ch == 'c')
emulation = EMULATE_CSH;
else if (ch == 'k')
emulation = EMULATE_KSH;
else if (ch == 's' || ch == 'b')
emulation = EMULATE_SH;
else
emulation = EMULATE_ZSH;
if (fully)
emulation |= EMULATE_FULLY;
installemulation();
}
Signed-off-by: Filip Krska <fkrska@redhat.com>
[jchaloup@redhat.com: corrected for upstream patch]
Signed-off-by: Jan Chaloupka <jchaloup@redhat.com>
---
Doc/Zsh/compat.yo | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Doc/Zsh/compat.yo b/Doc/Zsh/compat.yo
index bf97fe2..f1be15f 100644
--- a/Doc/Zsh/compat.yo
+++ b/Doc/Zsh/compat.yo
@@ -6,7 +6,7 @@ cindex(ksh compatibility)
Zsh tries to emulate bf(sh) or bf(ksh) when it is invoked as
tt(sh) or tt(ksh) respectively; more precisely, it looks at the first
letter of the name by which it was invoked, excluding any initial `tt(r)'
-(assumed to stand for `restricted'), and if that is `tt(s)' or `tt(k)' it
+(assumed to stand for `restricted'), and if that is `tt(b)', `tt(s)' or `tt(k)' it
will emulate bf(sh) or bf(ksh). Furthermore, if invoked as tt(su) (which
happens on certain systems when the shell is executed by the tt(su)
command), the shell will try to find an alternative name from the tt(SHELL)
next reply other threads:[~2014-06-02 15:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-02 15:06 jchaloup [this message]
2014-06-13 8:48 ` Jan Chaloupka
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=20140602150632.16888.49288.stgit@unused-4-157.brq.redhat.com \
--to=jchaloup@redhat.com \
--cc=fkrska@redhat.com \
--cc=zsh-workers@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).