* [PATCH] zsh.1,zshall.1: missing b emulation option in man page
@ 2014-06-02 15:06 jchaloup
2014-06-13 8:48 ` Jan Chaloupka
0 siblings, 1 reply; 2+ messages in thread
From: jchaloup @ 2014-06-02 15:06 UTC (permalink / raw)
To: zsh-workers; +Cc: fkrska, jchaloup
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] zsh.1,zshall.1: missing b emulation option in man page
2014-06-02 15:06 [PATCH] zsh.1,zshall.1: missing b emulation option in man page jchaloup
@ 2014-06-13 8:48 ` Jan Chaloupka
0 siblings, 0 replies; 2+ messages in thread
From: Jan Chaloupka @ 2014-06-13 8:48 UTC (permalink / raw)
To: zsh-workers
On 06/02/2014 05:06 PM, jchaloup wrote:
> 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)
>
Ping
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-13 9:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-02 15:06 [PATCH] zsh.1,zshall.1: missing b emulation option in man page jchaloup
2014-06-13 8:48 ` Jan Chaloupka
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).