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

Added $? equivalent to $env.LAST_EXIT_CODE #1757

Merged
merged 1 commit into from
Jan 24, 2025
Merged

Conversation

RolandMarchand
Copy link
Contributor

This pull request adds a nushell equivalent to a bash command in the Coming from Bash book chapter.

This is the added equivalence:

Bash Nu Task
echo $? $env.LAST_EXIT_CODE See the exit status of the last executed command

This equivalence was added because $? is very common in bash scripts.

The change can be previewed here: https://rolandmarchand.github.io/nushell.github.io/book/coming_from_bash.html#command-equivalents.

@fdncred fdncred merged commit 0e7bda2 into nushell:main Jan 24, 2025
2 checks passed
@fdncred
Copy link
Collaborator

fdncred commented Jan 24, 2025

Good catch. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants