POSIXシェルに該当するものはありますか?set -x
または、シェルで実行されているコマンドがシェルにset -o xtrace
表示されるようにしますか?fish
ベストアンサー1
Fish 3.1.0以降、このfish_trace
変数を使用すると、次の機能を使用できます。
> set fish_trace on; isatty; set -e fish_trace
++ source share/fish/functions/isatty.fish
++++ function isatty -d 'Tests if a file descriptor is a tty'
+ isatty
+++ set -l options h/help
+++ argparse -n isatty h/help --
+++ if
+++ set -q _flag_help
+++ end if
+++ if
+++ set -q 'argv[2]'
+++ end if
+++ set -l fd
++++ set fd 0
+++ '[' -t 0 ']'
+ set -e fish_trace
トレース出力の位置は、--debug-output
フィッシュプロセスのオプションによって制御されます。
fish 3.1.0より前は、fish -p some_trace_file
fishセッションを実行して構成ファイルを「some_trace_file」に出力することができました。