*BSD News Article 34944


Return to BSD News archive

Xref: sserve comp.unix.user-friendly:2784 comp.unix.solaris:21738 comp.unix.programmer:19540 comp.unix.misc:13645 comp.unix.aux:15166 comp.unix.bsd:14712 comp.unix.aix:43095
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!europa.eng.gtefsd.com!news.umbc.edu!haven.umd.edu!umd5.umd.edu!not-for-mail
From: brewer@hamlet.umd.edu (Peter Brewer)
Newsgroups: comp.unix.user-friendly,comp.unix.solaris,comp.unix.programmer,comp.unix.misc,comp.unix.aux,comp.unix.bsd,comp.unix.aix
Subject: Re: Shell wars (Re: xargs and alias commands)
Date: 25 Aug 1994 22:34:10 -0400
Organization: University of Maryland, College Park
Lines: 39
Distribution: inet
Message-ID: <33jkb2$6ev@hamlet.umd.edu>
References: <33af70$8rd@usenet.INS.CWRU.Edu> <33eevl$eja@hamlet.umd.edu> <33gvms$56a@wombat.cssc-syd.tansu.com.au> <33iajo$ibg@sprocket.csv.warwick.ac.uk>
NNTP-Posting-Host: hamlet.umd.edu

In article <33iajo$ibg@sprocket.csv.warwick.ac.uk>,
Rob McMahon <cudcv@csv.warwick.ac.uk> wrote:
>I can't believe I'm doing this.
>
>In article <33gvms$56a@wombat.cssc-syd.tansu.com.au>,
>chrisb@cssc-syd.tansu.com.au (Chris Bitmead) writes: 
>>>>I don't know how to do this in csh, but who would want to use csh anyway?
>>
>>>
>>>If its tcsh you'd be surprised. That's like asking who would want to use
>>>emacs when they have vi. Reality check.
>>
>>Who would want to use tcsh when you could be using bash/zsh/ksh? Reality
>>check. 
>
>I'll have a go with bash when they add `set autocorrect correct=all',
>"complete cd 'n/*/d/'" and decent arrays ... I'm not sure how I'd live without
>them.
>
>Cheers,
>INET:	cudcv@csv.warwick.ac.uk
>Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England

Try this:

alias cd 'set old=$cwd; chdir \!*; set back=$cwd:h; set prompt=$hostname\[$back:
t/$cwd:t\].\!\ '
set dist=5
alias p 'clear; @ from = \!\!:1 - ${dist}; @ end = \!\!:1 + ${dist};sed -n "\!\!

Let me know how well you do.

-- Peter
:1s/.*/U&u/; ${from},${end}p" \!\!:2' 
-- 
SAVE Mac Desktop Unix! Tell Apple to continue A/UX! Don't Let It Happen Again!->
  "Just about every computer on the market today runs Unix, except the Mac
   (and nobody cares about it)."               -- Bill Joy 6/21/85
********* Peter W. Brewer        brewer@umd5.umd.edu **********************