Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In bash, invoking set -x at the beginning of a script causes the commands to be printed on stdout while the script is executing. What's the equivalent syntax for the fish shell?

share|improve this question
2  
I think it's one of those deal-braking features between bash and fish. – Ярослав Рахматуллин Mar 10 '13 at 23:20

Fish's set command doesn't have that option.

However you could wrap set in your shell script. This would print the same format of output you're used to when placed at the top of a script.

function set; echo + set $argv; builtin set $argv; end

Alternatively, the function command has an --on-variable option that allows you to monitor particular variables for changes and have the function called automatically.

Or you can execute your fish script with fish -d 3 script.fish. This will print some tracing information.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .