Skip to main content
added 181 characters in body
Source Link
Shawn J. Goff
  • 46.3k
  • 25
  • 135
  • 147

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.

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 I can think of is $SHLVL increasing by one, and logging out requires quitting two shells.

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.

You can skip the part where you run subuser=nozimica tcsh when you login by having 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 ssh will run that command for you.

added 2 characters in body
Source Link
Shawn J. Goff
  • 46.3k
  • 25
  • 135
  • 147

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 I can think of is $SHLVL$SHLVL increasing by one, and logging out requires quitting two shells.

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.

The only side-effect I can think of is $SHLVL increasing by one, and logging out requires quitting two shells.

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 I can think of is $SHLVL increasing by one, and logging out requires quitting two shells.

Source Link
Shawn J. Goff
  • 46.3k
  • 25
  • 135
  • 147

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.

The only side-effect I can think of is $SHLVL increasing by one, and logging out requires quitting two shells.