I have a command I want to execute in .bashrc only when the current terminal window is managed by GNU screen. How do I tell it? Is there an environment variable for it? I used to have
if [ -n "$WINDOW" ]; then command fi
but, from what I can tell, $WINDOW may or may not be defined across all screen managed sessions