Skip to content

Fix option parsing so it works across possible SH implementations #287

Open
@alerque

Description

@alerque

Per the yucky discovery here our current option parsing is not robust across SH implementations. Whatever @RichiH's has works. My systems don't.

On my systems /bin/sh is a symlink to bash, which should be triggering its internal POSIX compatibility mode. Whatever you think of this it's a pretty common arrangement.

On the other hand I tested dash and I get different results:

$ ./vcsh -v foreach -g echo foo
verbose mode on
vcsh 1.20141026
vcsh: verbose: foreach begin
que-atom:
git: 'echo' is not a git command. See 'git --help'.

The most similar command is
        fetch

$ dash ./vcsh -v foreach -g echo foo
verbose mode on
vcsh 1.20141026
vcsh: verbose: foreach begin
que-atom:
foo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions