[nycbug-talk] using tcsh

George Georgalis george
Sat Aug 28 19:37:54 EDT 2004


On Sat, Aug 28, 2004 at 07:01:28PM -0400, Marc Spitzer wrote:
>On Sat, 28 Aug 2004 17:13:21 -0400
>George Georgalis <george at galis.org> wrote:
>
>> /*  Regards to the friends and family of Chuck Yerkes, RIP.  */
>> 
>> I've been over the tcsh man and other sources numerous times but have
>> been unable to save and restore tcsh command line history through exit
>> and next login.
>> 
>> 'set savehist' in ~/.tcshrc is all I'd expect be required, but I've
>> been doing various things with 'histfile' too; the functionality I'm
>> looking for is 'savehist 1000 merge' -- how do I know when to use
>> 'set' vs 'setenv'?
>> 
>
>Being that I have a severe dislike of csh and its derivatives this may
>not be 100% accurate, but:
>
>set == when you want it available in this shell and only in this shell
>
>setenv == when you want it available in this shell and any child
>processes of this shell
>
>see here for reasons why csh is bad: http://frmb.org/csh_whynot.html
>
>tcsh is better then csh but that is just not saying much.
>
>If you want to learn a portable shell look at korn or posix sh.


Well, before I share my opinion, I'm learning tcsh because that is the
default shell on systems I may or may not have control of...

That said, I'm pleasantly surprised at the tcsh options available even if
they aren't enabled by default; compared to my bash experience. But
things like directing stderr and stdout to separate places I guess will
always be problematic, I guess sh will be easiest for me to use in
scripts.

In any event, figuring out how to use ~/.history is a RPITA, and why on
earth would a ~/.history file ever be executed?!?!  per man:

       A  login  shell  begins  by  executing  commands  from the system files
       /etc/csh.cshrc and /etc/csh.login.   It  then  executes  commands  from
       files  in  the  user's  home  directory:  first  ~/.tcshrc  (+)  or, if
       ~/.tcshrc is not found, ~/.cshrc, then ~/.history (or the value of  the
       histfile shell variable), then ~/.login, and finally ~/.cshdirs (or the
       value of  the  dirsfile  shell  variable)  (+).

Uuugh.

// George


-- 
George Georgalis, systems architect, administrator Linux BSD IXOYE
http://galis.org/george/ cell:646-331-2027 mailto:george at galis.org




More information about the talk mailing list