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

elseif statement #134

Closed
maxfl opened this issue Jun 15, 2012 · 2 comments
Closed

elseif statement #134

maxfl opened this issue Jun 15, 2012 · 2 comments
Milestone

Comments

@maxfl
Copy link
Contributor

maxfl commented Jun 15, 2012

I wonder why fish doesn't have 'elseif' statement.
I think it is very useful thing. Event in case of one nested if statement, it saves one identation level and makes it easier to follow closing 'end's.

@ridiculousfish
Copy link
Member

I first implemented this as a new builtin, "elseif," but then decided I didn't like that. All fish builtins are real words. So now it's "else if":

if false
    echo "Branch 1"
else if true
    echo "Branch 2"
else
    echo "Branch 3
end

Docs updated too.

To git@github.com:fish-shell/fish-shell.git
ff12446..1a59346 master -> master

@maxfl
Copy link
Contributor Author

maxfl commented Sep 5, 2012

That's cool. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants