1 /// Support for fish_trace. 2 #ifndef FISH_TRACE_H 3 #define FISH_TRACE_H 4 5 #include "config.h" // IWYU pragma: keep 6 7 #include "common.h" 8 9 class parser_t; 10 class process_t; 11 12 /// Trace an "argv": a list of arguments. Each argument is escaped. 13 /// If \p command is not null, it is traced first (and not escaped) 14 void trace_argv(const parser_t &parser, const wchar_t *command, const wcstring_list_t &argv); 15 16 /// \return whether tracing is enabled. 17 bool trace_enabled(const parser_t &parser); 18 19 /// Convenience helper to trace a single string if tracing is enabled. 20 void trace_if_enabled(const parser_t &parser, const wchar_t *command, 21 const wcstring_list_t &argv = {}); 22 23 #endif 24