This one has been bugging me for a while: I want to use the marvelous GNU watch
command to run a few custom aliases and functions that are defined in my .bashrc, but it is never able to run anything except bash built-ins or binaries.
watch -d foo
The output is always: foo: command not found
How can I make it inherit my environment or use the .bashrc?
Thank you.
foo
? A shell script? An alias? What if you run thatwatch
command from your prompt?foo
can be a custom alias or a bash function, not just a simple call to a binary.x () { xmllint -format $* ;}