help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs Environment Variables


From: Tim X
Subject: Re: Emacs Environment Variables
Date: Tue, 27 Nov 2007 19:03:39 +1100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> Am 25.11.2007 um 07:18 schrieb Tim X:
>
>>> IMO bash is a bit too complicated to be used as a user's default  shell.
>>
>> Really? What would you recommend as a default user shell (and  please
>> don't
>> say csh!)?
>
>
> For interactive use I recommend tcsh to begin with. Tcsh makes no
> complicated difference between interactive and login shells, it  confuses
> an user only when preferring an existing ~/.cshrc before  ~/.tcshrc.
>
> Do you know why you are so prejudiced against csh?
>

A shell usually has two purposes, provide an interactive
environment/interface to the system and for writing shell scripts. Csh
added some 'nice' features for interactive work, but sacrificed
considerable power in scripting. Worse yet, its behavior in some situations
is/was 'unexpected' and the ability to handle redirection was totally
crippled. Back in the late 80s/early 90s, csh had some nice features that
most other shells didn't have. These days, there is nothing in csh you
don't get in most modern shells, yet you still have the limitations and
inconsistencies when it comes to scripting that it always had (some of them
have been fixed, but some can't because of basic design issues). 

I don't want to have to know two shells, one for interactive work and one
for scripting. I want one shell thats good for both and behaves
consistently and doesn't add constraints to how I solve problems. 

All shells seem to have their own idiosyncratic bits, but csh was the worst
I've seen. I've also found that generally, when I've had issues with a
shell script I didn't write, opening it often reveals it is csh. Back when
I was learning shell scripting, I made the mistake of using csh at
first. Once I'd been stung a few times and once I saw other solutions that
were better than mine because they didn't have the same limitations, I
stopped usinig it and stuck with sh. 

The other advantage of sh is that it has high compatibility and
portability. Pretty much any sh based script will run on systems that
support sh. Many systems don't even have csh or tcsh installed. 

Many years ago, there were a couple of articles/posts concerning csh
scripting being 'hazardous' for your health. A google will probably find a
copy somewhere. 

Tim

-- 
tcross (at) rapttech dot com dot au


reply via email to

[Prev in Thread] Current Thread [Next in Thread]