Search code examples
node.jsbashshellfish

Using debug NPM module with fish shell


I am currently using the npm module titled debug during development of a Node.JS application. As I understand it, it outputs the debugging results through the use of the DEBUG environment variable (?) using the bash command:

DEBUG=* node index.js

This works as intended for bash, but I was wondering what the equivalent would be using the Fish shell, I've just started using it and I like it but it would be great if I could get this functionality as well.

Thanks


Solution

  • For fish, to set an environment variable for a specific command, just use env

    env DEBUG="*" node index.js
    

    You'll have to quote or escape the wildcard.

    This approach works for bash too.