Add support for fish_trace variable to trace execution

This adds support for `fish_trace`, a new variable intended to serve the
same purpose as `set -x` as in bash. Setting this variable to anything
non-empty causes execution to be traced. In the future we may give more
specific meaning to the value of the variable.

The user's prompt is not traced unless you run it explicitly. Events are
also not traced because it is noisy; however autoloading is.

Fixes #3427
This commit is contained in:
ridiculousfish
2019-10-18 18:08:22 -07:00
parent dd1f8489a7
commit a7f1d2c0c7
15 changed files with 189 additions and 6 deletions

View File

@@ -23,7 +23,7 @@ The following options are available:
- ``-d`` or ``--debug=CATEGORY_GLOB`` enables debug output and specifies a glob for matching debug categories (like ``fish -d``). Defaults to empty.
- ``-o`` or ``--debug-output=path`` Specify a file path to receive the debug output. The default is stderr.
- ``-o`` or ``--debug-output=path`` Specify a file path to receive the debug output, including categories and ``fish_trace``. The default is stderr.
- ``-i`` or ``--interactive`` specify that fish is to run in interactive mode