2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
title: exit
|
|
|
|
layout: command
|
2022-03-04 13:10:09 +01:00
|
|
|
version: 0.59.1
|
2022-02-14 03:22:51 +01:00
|
|
|
---
|
2019-10-01 16:10:16 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
Runs a script file in the current context.
|
2019-10-01 16:10:16 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
## Signature
|
2019-10-01 16:10:16 +02:00
|
|
|
|
2022-02-20 02:13:33 +01:00
|
|
|
```> exit (exit_code) --now```
|
2022-02-14 03:22:51 +01:00
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2022-02-20 02:13:33 +01:00
|
|
|
- `exit_code`: Exit code to return immediately with
|
2022-02-14 03:22:51 +01:00
|
|
|
- `--now`: Exit out of the shell immediately
|
2019-10-01 16:10:16 +02:00
|
|
|
|
2022-02-20 02:13:33 +01:00
|
|
|
## Examples
|
|
|
|
|
|
|
|
Exit the current shell
|
|
|
|
```shell
|
|
|
|
> exit
|
|
|
|
```
|
|
|
|
|
|
|
|
Exit all shells (exiting Nu)
|
|
|
|
```shell
|
|
|
|
> exit --now
|
|
|
|
```
|