Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differences between shells #32

Open
Arcterus opened this issue Jul 17, 2018 · 0 comments
Open

Differences between shells #32

Arcterus opened this issue Jul 17, 2018 · 0 comments

Comments

@Arcterus
Copy link
Contributor

Arcterus commented Jul 17, 2018

I'm probably gonna use this issue to document differences that I've noticed between our shell and other shells, so it'll be edited/added to over time.

shift in function

Input

fn() { shift; echo hello; }
fn

Results

mesabox

illegal number "1"
hello

bash

hello

zsh

fn:shift: shift count must be <= $#
hello

dash

Notice that dash does not print hello at all. I didn't notice this in the specification, so I'm not actually sure if this is correct behavior (other built-ins like trap let the function continue normally).

dash: 1: shift: can't shift that many
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant