You can make .tcshrc
check a special environment variable (like subuser
), and conditionally source .tcshrc_cust
. When you log in, run subuser=nozimica tcsh
. It will get that enironment variable and execute your custom rc script. In addition, vim's :sh
command will work. You can even make it fancy and source .tcshrc_$subuser
; that way everyone could do it.
The only side-effect IYou can think of isskip the part where you run $SHLVLsubuser=nozimica tcsh
increasingwhen you login by onehaving ssh run it for you. If you setup ssh key authentication, then in ~/.ssh/authorized_keys
on the server, you can prefix your key with command="subuser=nozimica tcsh"
, and logging out requires quitting two shellsssh will run that command for you.