2006-10-31 23:23:16 +08:00
\section status status - query fish runtime information
2005-09-20 22:11:05 +08:00
\subsection status-synopsis Synopsis
2014-08-01 20:25:41 +08:00
\fish{synopsis}
2016-11-05 13:32:43 +08:00
status
status is-login
status is-interactive
status is-block
2017-06-20 12:05:34 +08:00
status is-breakpoint
2016-11-05 13:32:43 +08:00
status is-command-substitution
status is-no-job-control
status is-full-job-control
status is-interactive-job-control
2017-06-21 12:10:15 +08:00
status filename
status function
status line-number
status stack-trace
2016-11-05 13:32:43 +08:00
status job-control CONTROL-TYPE
2014-08-01 10:37:32 +08:00
\endfish
2005-09-20 22:11:05 +08:00
\subsection status-description Description
2014-08-19 20:41:23 +08:00
2014-08-01 10:37:32 +08:00
With no arguments, `status` displays a summary of the current login and job control status of the shell.
2013-04-29 13:45:14 +08:00
2016-11-05 13:32:43 +08:00
The following operations (sub-commands) are available:
2014-08-19 20:41:23 +08:00
2016-11-05 13:32:43 +08:00
- `is-command-sub` returns 0 if fish is currently executing a command substitution. Also `-c` or `--is-command-substitution`.
2014-08-19 20:41:23 +08:00
2016-11-05 13:32:43 +08:00
- `is-block` returns 0 if fish is currently executing a block of code. Also `-b` or `--is-block`.
2014-08-19 20:41:23 +08:00
2017-06-20 12:05:34 +08:00
- `is-breakpoint` returns 0 if fish is currently showing a prompt in the context of a `breakpoint` command. See also the `fish_breakpoint_prompt` function.
2016-11-05 13:32:43 +08:00
- `is-interactive` returns 0 if fish is interactive - that is, connected to a keyboard. Also `-i` or `--is-interactive`.
2014-08-19 20:41:23 +08:00
2016-11-05 13:32:43 +08:00
- `is-login` returns 0 if fish is a login shell - that is, if fish should perform login tasks such as setting up the PATH. Also `-l` or `--is-login`.
2014-08-19 20:41:23 +08:00
2016-11-05 13:32:43 +08:00
- `is-full-job-control` returns 0 if full job control is enabled. Also `--is-full-job-control` (no short flag).
2014-08-19 20:41:23 +08:00
2016-11-05 13:32:43 +08:00
- `is-interactive-job-control` returns 0 if interactive job control is enabled. Also, `--is-interactive-job-control` (no short flag).
2014-08-19 20:41:23 +08:00
2016-11-05 13:32:43 +08:00
- `is-no-job-control` returns 0 if no job control is enabled. Also `--is-no-job-control` (no short flag).
2014-08-19 20:41:23 +08:00
2017-06-21 12:10:15 +08:00
- `filename` prints the filename of the currently running script. Also `current-filename`, `-f` or `--current-filename`.
2014-08-19 20:41:23 +08:00
2017-06-24 13:14:21 +08:00
- `function` prints the name of the currently called function if able, when missing displays "N/A". Also `current-function`, `-u` or `--current-function`.
2017-04-13 06:34:25 +08:00
2017-06-21 12:10:15 +08:00
- `line-number` prints the line number of the currently running script. Also `current-line-number`, `-n` or `--current-line-number`.
2014-08-19 20:41:23 +08:00
2016-11-05 13:32:43 +08:00
- `job-control CONTROL-TYPE` sets the job control type, which can be `none`, `full`, or `interactive`. Also `-j CONTROL-TYPE` or `--job-control=CONTROL-TYPE`.
2014-08-19 20:41:23 +08:00
2017-06-21 12:10:15 +08:00
- `stack-trace` prints a stack trace of all function calls on the call stack. Also `print-stack-trace`, `-t` or `--print-stack-trace`.
2016-11-05 13:32:43 +08:00
\subsection status-notes Notes
For backwards compatibility each subcommand can also be specified as a long or short option. For example, rather than `status is-login` you can type `status --is-login`. The flag forms are deprecated and may be removed in a future release (but not before fish 3.0).
You can only specify one subcommand per invocation even if you use the flag form of the subcommand.