[comp.sys.3b1] csh

jwbirdsa@amc-gw.amc.com (James Birdsall) (03/05/91)

   I got the csh from osu (pub/att7300/csh-src.tar.Z). It compiled without
significant incident using gcc 1.39 -- one warning in the last file.

   It seems to be a reasonably functional csh. The job control features are
missing, but given the lack of kernel support, this is hardly surprising.
History, aliases, and filename expansion all seem to work normally. The
enhanced cd (with cdpath) works. The builtin function "eval" is missing.

   There's only one thing that really really really should be there that
isn't. IT DOESN'T DO FILENAME COMPLETION! _Why_ doesn't it do filename
completion? I don't know of any technical reason why the 3B1 couldn't
support it (unlike the job control stuff). Of course, filename completion
is one of the major reasons that I wanted a csh in the first place.

   Ranting aside, the most difficult part of getting csh running is hacking
up a .cshrc and a .login, which amounts to boiling down /etc/profile.
It wasn't terribly difficult, although the lack of "eval" was a pain. I had
to redirect the output of a "tset -s ..." to a temporary file and source
from the temporary file.

-- 
James W. Birdsall   WORK: jwbirdsa@amc.com   {uunet,uw-coco}!amc-gw!jwbirdsa
HOME: {uunet,uw-coco}!amc-gw!picarefy!jwbirdsa OTHER: 71261.1731@compuserve.com
========== "Think of an animal that's small and fuzzy." "Mold." -- RM =========
=========== "For it is the doom of men that they forget." -- Merlin ===========

dnichols@ceilidh.beartrack.com (DoN Nichols) (03/05/91)

In article <5964@amc-gw.amc.com> jwbirdsa@polaris.amc.com () writes:
>
>   I got the csh from osu (pub/att7300/csh-src.tar.Z). It compiled without
>significant incident using gcc 1.39 -- one warning in the last file.

	I compiled it under gcc 1.37, also no real problems, just some
warnings, which were eliminated by adding a declaration for the return type
of signal(2)

	Also, look out for the definition of SHELLPATH in sh.local.h.  As
delivered, it is expecting the csh to reside in something like "/ucb/bin/csh".
I have already changed it, and don't want to locate and untar or uncpio the
file it came in, but this should be changed to "/bin/csh", or wherever you
want the csh to live.  I didn't want to make an extra directory and add it
to the PATH, just for a single program to which I have source.  If I had
nothing but a binary, the choices would be to patch with adb, or to live
with the extra directory.

>   It seems to be a reasonably functional csh. The job control features are
>missing, but given the lack of kernel support, this is hardly surprising.
>History, aliases, and filename expansion all seem to work normally. The
>enhanced cd (with cdpath) works. The builtin function "eval" is missing.
>
>   There's only one thing that really really really should be there that
>isn't. IT DOESN'T DO FILENAME COMPLETION! _Why_ doesn't it do filename
>completion? I don't know of any technical reason why the 3B1 couldn't
>support it (unlike the job control stuff). Of course, filename completion
>is one of the major reasons that I wanted a csh in the first place.

	Well, I wanted it for the history mechanism, but I've had enough
time to learn ksh, and I far prefer it, especially the version from THE
STORE.  At this point, I only wanted csh for completeness.  It is still more
functional than the csh on my old v7 machine :-) (Acutally, I haven't gotten
around to testing it for the reversed test bug, yet.)  (Come to think of it,
I haven't tested the csh on my Tektronix 6130 (4.3BSD) yet either.)  I wish
that I could afford ksh source for it, now that I've become addicted to
emacs (jove) editing mode in the shell command line.

	Happy Hacking
		DoN.

-- 
Donald Nichols (DoN.)		| Voice (Days):	(703) 664-1585
D&D Data			| Voice (Eves):	(703) 938-4564
Disclaimer: from here - None	| Email:     <dnichols@ceilidh.beartrack.com>
	--- Black Holes are where God is dividing by zero ---

bruce@balilly.UUCP (Bruce Lilly) (03/07/91)

In article <5964@amc-gw.amc.com> jwbirdsa@polaris.amc.com () writes:
>
>   There's only one thing that really really really should be there that
>isn't. IT DOESN'T DO FILENAME COMPLETION! _Why_ doesn't it do filename
>completion? I don't know of any technical reason why the 3B1 couldn't
>support it (unlike the job control stuff). Of course, filename completion
>is one of the major reasons that I wanted a csh in the first place.

So use ksh. The version on osu-cis from the STORE is reasonably recent,
and does do filename completion, as well as many of the other ksh
features.

>   Ranting aside, the most difficult part of getting csh running is hacking
>up a .cshrc and a .login, which amounts to boiling down /etc/profile.

Of course, another nice thing about ksh is that it's upwards compatible
with the Bourne shell.  You needn't mess with .cshrc, .login and other csh
arcana.

I used to use csh about 5 years ago on an HP machine.  I first used ksh on
the unix-pc about 3 years ago, and I loved it.  Last week I was forced to
use a machine that didn't have ksh, only csh. That was incredibly
frustrating! (or should that be \! :-)
--
	Bruce Lilly		blilly!balilly!bruce@sonyd1.Broadcast.Sony.COM

sparkie@picard.cs.wisc.edu (Mark J. Horn) (03/09/91)

In article <1991Mar7.043142.9412@blilly.UUCP> bruce@balilly.UUCP (Bruce Lilly) writes:

[ ... ]

>So use ksh. The version on osu-cis from the STORE is reasonably recent,
>and does do filename completion, as well as many of the other ksh
>features.

[ ... ]

Simply put - I LOVE ksh.  Anyone that has ever had to write shell scripts
in csh and had to explicitly unset every variable after they were done with 
it knows what I mean, BUT!! csh had the easiest filename completion that I've
ever tried.  Simply "set filec" then <ESC> would attempt to complete any file
that you began to type.  Now as far as I know, the way to use filename
completion in ksh is to use <CTRL-8>.  That has not, to this day, worked...
ever!  A bunch of garbage that contains some remnants of part of the filename
shows up, but that's it.  It is NOT usable.  

Soooo...what am I doing wrong?  I believe I have to ksh that came with the
FIXDISK_2.0 stuff.  I've heard reports that this ksh sucks.  What's the scoop?
Will the ksh on the STORE fix my problem?

TIA,
- sparkie
p.s.	BTW, mail on this machine is broken :-(  Try sending it to:
		harier!sparkie@cs.wisc.edu
	instead!  Tnx, again.
-- 
 ___  ___  ___  ___  _  _  _  ___
/ __\| . \/ . \| . \| |/ /|_|| _ |	sparkie@picard.cs.wisc.edu
\__ \| __/|   || _ /|   < | || _[		 - or -
\___/|_|  |_|_||_|\\|_|\_\|_||___|	harier!sparkie@cs.wisc.edu

yarvin-norman@cs.yale.edu (Norman Yarvin) (03/09/91)

sparkie@picard.cs.wisc.edu (Mark J. Horn) writes:
>  Now as far as I know, the way to use filename
>completion in ksh is to use <CTRL-8>.

No; it's ESC * or ESC ESC.

thad@public.BTR.COM (Thaddeus P. Floryan) (03/11/91)

In article <1991Mar8.223519.25569@daffy.cs.wisc.edu> sparkie@picard.cs.wisc.edu (Mark J. Horn) writes:
>[ ... ]
>Simply put - I LOVE ksh.  Anyone that has ever had to write shell scripts
>[...]
>it knows what I mean, BUT!! csh had the easiest filename completion that I've
>ever tried.  Simply "set filec" then <ESC> would attempt to complete any file
>that you began to type.  Now as far as I know, the way to use filename
>completion in ksh is to use <CTRL-8>.  That has not, to this day, worked...
>[...]
>Soooo...what am I doing wrong?  I believe I have to ksh that came with the
>FIXDISK_2.0 stuff.  I've heard reports that this ksh sucks.  What's the scoop?
>Will the ksh on the STORE fix my problem?

Yes, the ksh from the STORE area at osu-cis will fix your problem IF you
use EMACS mode (either emacs or gmacs).

Given that I've been using EMACS for over 14 years (originally on my DEC-20s),
that's my preference, and the only real anomaly between emacs mode in ksh and
the emacs editor is the handling of ^T to transpose 2 characters; neither of
the two ksh emacs modes do it correctly (in all versions of ksh I've seen to
date).

Thad Floryan [ thad@btr.com (OR) {decwrl, mips, fernwood}!btr!thad ]

azar@morpho.UUCP (Jim Van Horn) (03/12/91)

I've used csh for some years.  Now I'm getting pretty comfortable
with ksh too.  One thing that I think csh does better is the
"last argument of the previous command" abbreviation (!$ on csh,
$_ on ksh).  I don't know why, but ksh saves the literal "$_" key
sequence in the history file instead of the substitution.
Incredibly dumb.

BTW, anyone tried the new shell on the block, rc?  From what little
I've read about it, it sounds attractive in that it's small and 
compact without losing a lot of functionality.  It's got its own
programming syntax, of course, but I don't write many shell scripts
anyway.  It does save commands in a history file, but there is no
history accessing mechanism.  You get to roll your own or wait for
the myriad packages to appear on the net.
-- 
	-=-	=-=	-=-	=-=	-=-	=-=	-=-
-Jim Van Horn	uunet!amc-gw!morpho!azar

	      "Where it falls mandrakes grow.
	That's why they shriek when you pull them up"

almquist@brahms.udel.edu (Squish) (03/14/91)

I've grown quite fond of tcsh - cause, it has file completion and SCROLLING
HISTORY.  Press tab to complete a filename, press tab to complete an executable
command name (easy, type mo[tab] and get "more"), press cntrl-P to scroll
through previously typed commands, no <bang> this <bang> that.  Funny thing,
working at HP EVERYONE used/loved ksh.  You can find it on gatekeeper.dec.com 
(or whatever it is - sorry, forget at the moment).  AND, as an added bonus, 
you can program tcsh just like it was csh.  Only drawback, its kinda big - at 
least compared to ksh and csh.  BUT STILL, Just say "NO".  There is a better 
way TCSH!  

- Mike Almquist (almquist@brahms.udel.edu)

john@chance.UUCP (John R. MacMillan) (03/18/91)

|I've grown quite fond of tcsh - cause, it has file completion and SCROLLING
|HISTORY.

Ksh has these as well.

|...  AND, as an added bonus, 
|you can program tcsh just like it was csh.

Funny, I've always considered that a big disadvantage.

|Only drawback, its kinda big - at 
|least compared to ksh and csh.  BUT STILL, Just say "NO".  There is a better 
|way TCSH!

It's a religious issue.

andersom@spot.Colorado.EDU (Marc Anderson) (03/18/91)

In article <19613@brahms.udel.edu> almquist@brahms.udel.edu (Squish) writes:
>I've grown quite fond of tcsh - cause, it has file completion and SCROLLING
>HISTORY.  Press tab to complete a filename, press tab to complete an executable
>command name (easy, type mo[tab] and get "more"), press cntrl-P to scroll
>through previously typed commands, no <bang> this <bang> that.  Funny thing,
>working at HP EVERYONE used/loved ksh.  You can find it on gatekeeper.dec.com 
>(or whatever it is - sorry, forget at the moment).  AND, as an added bonus, 
>you can program tcsh just like it was csh.  Only drawback, its kinda big - at 
>least compared to ksh and csh.  BUT STILL, Just say "NO".  There is a better 
>way TCSH!  
>
>- Mike Almquist (almquist@brahms.udel.edu)

tcsh kicks ass!!  I love it!  I just haven't been able to port it or find
binaries to the 3b1.  Do you have a copy running on the 3b1?  if so, could
you upload it for us onto osu?

-marc