status
: no arguments, simply display the current login and job control status of the Fish shell.
status is-login / --is-login / -l
: return 0 if current Fish shell is a login shell
status is-interactive / --is-interactive / -i
: return 0 if current Fish shell is interactive (connected to a keyboard)
status is-block / --is-block / -b
: return 0 if fish is currently executing a block of code.
status is-command-substitution
: return 0 if fish is currently executing a command substiturion.
status current-command
: prints the name of the currently-running function or command (similar to $_
bash variable) (usually fish
)
status current-commandline
: prints the entirety of the currently-running commandline (jobs and operators are included) (usually nothing)
E.g.
status filename / current-filename / --current-filename / -f
: prints the filename of the currently-running script (layer of execution is considered here!)
- If the current script was called via a symlink, this will return the symlink.
- If the current script was received by piping into source, this will return - (usually the function that aren't created interactively but using 'alias' (which use source internally) or function & funcsave).
status basename
: prints just the filename of the running script, without any path components before.
status dirname
: prints just the path to the running script, without the actual filename. (usually .
)
status fish-path
: prints the absolute path to the currently executing instace of Fish (usually /usr/bin/fish
)
status function / current-function
: prints the name of the currently called function (if able), when you're not inside a function, displays Not a function
.