3 ms·
No, you can just run your shell under it. You certainly wouldn't want to actually modify anything. The following sequence works: `./redwrapper zsh `pytho
by burgerbrain 15y ago
No, you can just run your shell under it. You certainly wouldn't want to actually modify anything.
The following sequence works:
`./redwrapper zsh
`python -c 'import os; print "Yo!"; os.write(2, "Jola\n\r");'`
This is because the values of stderr/stdout are inherited, unless they are purposely overwritten (redirection or anything that allocates it's own PTY (like 'ssh'), both of which of course disables 'red-ification').
Anyway, neither of these solutions are something I would ever deploy in an "always on" setup (although it could be done in mine as well). You certainly wouldn't want to do it for your users, so they're always going to have to type something (or mess their shell's init files, which should work for mine as well).
So this is about as transparent to the user as I dare make it. Unfortunately it is not 100% transparent to the programs you are running under it since they can figure out that stderr is not /dev/tty. Nothing seems to care, with the exception of bash, which uses stderr for seemingly everything inexplicably.