status returns the function name when called with -u parameter

Fixes #1743
This commit is contained in:
Marc Garcia Sastre
2017-04-13 00:34:25 +02:00
committed by Kurtis Rader
parent 2565c5c15b
commit 980af4aa5b
6 changed files with 33 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ status is-no-job-control
status is-full-job-control
status is-interactive-job-control
status current-filename
status current-function
status current-line-number
status print-stack-trace
status job-control CONTROL-TYPE
@@ -38,6 +39,8 @@ The following operations (sub-commands) are available:
- `current-filename` prints the filename of the currently running script. Also `-f` or `--current-filename`.
- `current-function` prints the name of the currently called function if able, when missing displays "Not a function". Also `-u` or `--current-function`.
- `current-line-number` prints the line number of the currently running script. Also `-n` or `--current-line-number`.
- `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`.