🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1213

Re: Help needed with conditional statement for alias in csh

#1213
From: karl_kleinpaste
Date: Fri, 21 Sep 1990 12:52
37 lines
2253 bytes
dkeisen@Gang-of-Four.Stanford.EDU writes:
   && and || both work exactly the opposite of how one would expect them to 
   work (and of how they do in fact work in the Bourne shell).

Yet another vendor shipping a positively prehistoric incantation of
csh.

The version of csh which had inverted sense of || and && existed in
the vicinity of 2.8BSD.  This dates it in the vicinity of 1981 or
1982.  It has long been fixed in more recent versions.  However, that
version is by far the easiest thing to port to SysV (until Rel4) since
it lacked any concept of the "new" tty driver, jobs, and a variety of
other things.

All these vendors (SCO, Microsoft, Microport, Everex) shipping ancient
csh should invest a little time in upgrading their sources for csh to
include features in recent versions.  For example, all these versions
lack (as I recall) the eval builtin and the directory stack as well.
(I was at a Waldenbooks the other night and came across a book on SCO
Xenix.  In the chapter [an entire chapter!] describing csh, one of the
first things shown is a set of aliases to simulate the builtin
directory stack of a proper csh.)  There's no excuse for taking this
LCD approach to csh -- yes, csh is pretty grotesque, but the very
least the vendors could do is pick up an old csh that can be ported,
and a new csh with bugs fixed and common features in place, and merge
the two to create something reasonable.

I did exactly such a thing with exactly such a csh (2.8BSD version) 6
years ago.  It isn't tough; it isn't even particularly time-consuming.
The directory stack and the eval builtin code can be inhaled whole.

--karl
once-semi-proud creator
of a SysVRel1-compatible
job-controllified csh
based on 2.8BSD csh
(SIGTSTP emulated on SIGQUIT)
Technical Details
Message-ID: <KARL.90Sep21085223@giza.cis.ohio-state.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tut.cis.ohio-state.edu!cis.ohio-state.edu!karl_kleinpaste
References: <1990Sep20.090627.20515@Neon.Stanford.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tut.cis.ohio-state.edu!cis.ohio-state.edu!karl_kleinpaste
From: karl_kleinpaste@cis.ohio-state.edu
Newsgroups: comp.unix.shell
Subject: Re: Help needed with conditional statement for alias in csh
Message-ID: <KARL.90Sep21085223@giza.cis.ohio-state.edu>
Date: 21 Sep 90 12:52:23 GMT
References: <1990Sep20.090627.20515@Neon.Stanford.EDU>
Sender: news@tut.cis.ohio-state.edu
Organization: Ohio State Computer Science
Lines: 37