Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1066913 - zsh man page omits sh emulation if $0 starts with 'b'
Summary: zsh man page omits sh emulation if $0 starts with 'b'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: zsh
Version: 20
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Dominic Hopf
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-19 10:26 UTC by Filip Krska
Modified: 2014-11-13 14:51 UTC (History)
3 users (show)

Fixed In Version: zsh-5.0.6-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of: 1066537
Environment:
Last Closed: 2014-11-13 14:51:16 UTC


Attachments (Terms of Use)
man zsh, zshall fix (deleted)
2014-02-19 10:26 UTC, Filip Krska
no flags Details | Diff

Description Filip Krska 2014-02-19 10:26:53 UTC
Created attachment 865019 [details]
man zsh, zshall fix

+++ This bug was initially created as a clone of Bug #1066537 +++

Description of problem:

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();
}



Version-Release number of selected component (if applicable):

All versions

How reproducible:

Always

Steps to Reproduce:
1. man zsh
2. man zshall
3.

Actual results:

...
       and  if  that  is  ‘s’ or ‘k’ it will emulate sh or ksh.  Furthermore, if invoked as su (which happens on certain
...

Expected results:

...
       and if that is ‘b’, ‘s’ or ‘k’ it will emulate sh or ksh.  Furthermore, if invoked as su (which happens  on  cer-
...

Additional info:

Comment 1 Kamil Dudka 2014-11-13 14:51:16 UTC
upstream commit:

http://sourceforge.net/p/zsh/code/ci/d6698d89


Note You need to log in before you can comment on or make changes to this bug.