🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #125

Re: tcsh in the future - what should it be like?

#125
From: Tony J Yeates
Date: Thu, 23 Jul 1992 18:15
62 lines
2961 bytes
Tom Christiansen <tchrist@convex.COM> writes:

>From the keyboard of yeates@rtsg.mot.com (Tony J Yeates):
>:	$(command)	-  `command` (speed)

>Not so much speed, I think, as to clean up the quoting rules and 
>make nesting possible.

I hesitate before putting that in.  The Korn book does talk
only about the simplified quoting, but a ksh "guru" friend,
who is apparently in regular contact with Mr. Korn told
me that there was a speed advantage  (or may be it was
just $(< )?.  Simplified quoting is one of the  main reasons
that I prefer to write scripts in ksh (despite being a tcsh user).


>:	$(variablename##pattern)
>:	$(variablename#pattern)	- cut specified short/long pattern off of start/end of variable
>:	$(variable%%pattern)						(versatile, fast)
>:	$(variable%pattern)

>What's wrong with $var:s/foo/bar/, except that it doesn't deal with regexps?

Regular expressions (actually, are these  true regular expressions, 
the normal UNIX regexp rules are not strictly used it seems?)
is the main use of the pattern matching stuff, in my experience.
(Other related csh stuff include the head, tail, etc. operators
that work on paths).

>    set bar = $foo:s/d$//:q

Hadn't seen that before.

>Also: currently :s only works with history, not straight variables.


>:	print	- built in replacement for echo (speed, more versatile, more intuitive name?)

>And to grok \escapes, which have no business in echo.

Sorry, don't understand your banter old bean.

>:More commonality with ksh would be an improvement I think (e.g. use the same symbols
>:shown above, rather than creating new ones, just for the sake of it).
>:
>:2) Leave the command line editing alone - its better thank ksh

>Well, last I checked (not 6.0+) the vi mode in ksh was better than tcsh.

Although I'm a vi user, I always use the emacs-editing mode to
tcsh - its simple, intuitive and quick.  I don't like ksh's
vi mode either.

>Frankly, I think it's hopeless trying to salvage the csh for programming
>use.  I do still prefer tcsh's interactivity to ksh's, however.

I'm not trying to revive csh for scripting, but as it is still used
- I'd like to see it "fully functional" and as compatible/similar
to ksh as possible.  I fully concur with your last statement - tcsh
is, when configured "correctly", is hard to beat as an interactive shell.
I'm very please with it.
>--tom
Technical Details
Message-ID: <yeates.711915328@beryl17>
Path: arc1-ca.pugleaf.net!sparky!uunet!ftpbox!motsrd!white!sapphire.rtsg.mot.com!beryl17!yeates
References: <yeates.711122638@beryl17> <1992Jul14.224856.7768@news.eng.convex.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.shell
Path: arc1-ca.pugleaf.net!sparky!uunet!ftpbox!motsrd!white!sapphire.rtsg.mot.com!beryl17!yeates
From: yeates@rtsg.mot.com (Tony J Yeates)
Subject: Re: tcsh in the future - what should it be like?
Message-ID: <yeates.711915328@beryl17>
Keywords: tcsh
Sender: news@rtsg.mot.com
Nntp-Posting-Host: beryl17
Organization: Motorola Inc., Cellular Infrastructure Group
References: <yeates.711122638@beryl17> <1992Jul14.224856.7768@news.eng.convex.com>
Distribution: comp.unix.shell
Date: Thu, 23 Jul 1992 18:15:28 GMT
Lines: 63