[comp.unix.wizards] tcsh - some more questions

rogers@falcon.SRC.Honeywell.COM (Brynn Rogers) (03/15/89)

A few people here including me are starting to use tcsh.

I have a couple of questions that aren't answered anywhere in the documentation
file. (and the other people here seem to have the same problems)

1) Where should I 'exec tcsh' or 'exec -tcsh'?  
   In my .cshrc file?   with 'if (! $?tcsh) exec -tcsh' for example?
   In my .login file?

2) should  'set history=100 ; set savehist=100'  be done before 
   entry into tcsh or after?   I can't get history to work anymore.
   (when I invoked tcsh manually the history seemed to work fine.)

3) How do I make stty understand that I want pass8 permanently on?
   (It seems like when I exit vi or some programs that it will no
    longer accept Meta-something, but stty shows pass8 still correct.
    doing 'stty pass8' again fixes it for a while)

4) is this the group where I post this?  Should I try and send this
   in as a bug report?


 Brynn Rogers    Honeywell S&RC        rogers@src.honeywell.com
           also try this new address -> nic.MR.net!srcsip!rogers

spolsky-joel@CS.YALE.EDU (Joel Spolsky) (03/15/89)

In article <18686@srcsip.UUCP> rogers@falcon.UUCP (Brynn Rogers) writes:
| 1) Where should I 'exec tcsh' or 'exec -tcsh'?  
|    In my .cshrc file?   with 'if (! $?tcsh) exec -tcsh' for example?
|    In my .login file?

What you should do is change your default login shell to tcsh using
the program "chsh", which has to be modified to allow changing your
shell to something other than /bin/csh. If you don't have the source
to chsh there is probably a file somewhere that lists "legal" shells -
see your system documentation.

It is a waste to load csh and then scrap it every time you log on.

| 
| 2) should  'set history=100 ; set savehist=100'  be done before 
|    entry into tcsh or after?   I can't get history to work anymore.
|    (when I invoked tcsh manually the history seemed to work fine.)

This should be in your .cshrc file.

|  Brynn Rogers    Honeywell S&RC        rogers@src.honeywell.com
|            also try this new address -> nic.MR.net!srcsip!rogers

+----------------+----------------------------------------------------------+
|  Joel Spolsky  | bitnet: spolsky@yalecs.bitnet     uucp: ...!yale!spolsky |
|                | internet: spolsky@cs.yale.edu     voicenet: 203-436-1483 |
+----------------+----------------------------------------------------------+
                                                      #include <disclaimer.h>

heilpern@ibd.BRL.MIL (Mark A. Heilpern ) (03/18/89)

In article <18686@srcsip.UUCP> rogers@falcon.UUCP (Brynn Rogers) writes:
>A few people here including me are starting to use tcsh.
>
>
>1) Where should I 'exec tcsh' or 'exec -tcsh'?  
>   In my .cshrc file?   with 'if (! $?tcsh) exec -tcsh' for example?
>   In my .login file?
>
>2) should  'set history=100 ; set savehist=100'  be done before 
>   entry into tcsh or after?   I can't get history to work anymore.
>   (when I invoked tcsh manually the history seemed to work fine.)


As far as your 'tcsh' question, I don't think you really wand to
'exec' tcsh at all. When you exec from within a script file, you are
merely replacing the script file with the exec file, _not_ replacing the
shell. If you don't want to always use tcsh, then you've got to exec tcsh
by hand from the shell level. To always use tcsh, there is a command called
'chsh' for change shell. Consult your man page for specifics.
Note: if the location of tcsh on your system is not in /bin or /usr/bin,
you will have to have a super-user make the change for you.

Set your hist variables from within .tcshrc

		Mark A. Heilpern, heilpern@brl.mil

-- 
 |\/|         |
 |  |   _     |<
/    \_(_(_)\_/ \______

guy@auspex.UUCP (Guy Harris) (03/22/89)

 >>1) Where should I 'exec tcsh' or 'exec -tcsh'?  
 >>   In my .cshrc file?   with 'if (! $?tcsh) exec -tcsh' for example?
 >>   In my .login file?
 >
 >As far as your 'tcsh' question, I don't think you really wand to
 >'exec' tcsh at all. When you exec from within a script file, you are
 >merely replacing the script file with the exec file, _not_ replacing the
 >shell.

Not true, in this case.  ".cshrc" and ".login" files are *not* executed
in subshells, so if you do "exec tcsh" in your ".login", "tcsh" will
*replace* your login shell, not be run underneath it.