Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!mp.cs.niu.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!jbn35564 From: jbn35564@uxa.cso.uiuc.edu (J.B. Nicholson) Newsgroups: comp.unix.shell Subject: Is there a smart pwd display program? Summary: Is there a pwd displayer that shows the pwd using ~ notation? Keywords: smart pwd display tilde-notation fast Message-ID: <1991Apr15.170910.28160@ux1.cso.uiuc.edu> Date: 15 Apr 91 17:09:10 GMT Sender: usenet@ux1.cso.uiuc.edu (News) Reply-To: jeffo@uiuc.edu Organization: University of Illinois at Urbana Lines: 31 I'm writing a function for KSH that shows you your current working directory using tilde notation: What you type: What you get from the function: --------------------------------------------------------------------------- cd ~/ cd ~joeuser ~joeuser cd /home/dir/of/joeuser ~joeuser cd .. /home/dir/of cd / / cd /home/dir/of/me/1/2/3 ~/1/2/3 So you get the idea. It runs pretty fast, but I was wondering if there's a program (written in some compiled language, or maybe even Perl or something) that'll give you the same thing, that would probably be better to run than my function because it would be faster. I'm currently trying to add some stuff that'll make it seem faster and trying to use only the quickest way of addressing things like if-then's and so forth (I posted a note about this before). I'll be glad to share my function once I've finished it. Thanks. Jeff -- +----------------------------------------------------------------------------+ | "If you hear an onion ring - answer it." J.B. Nicholson | +----------------------------------------------------------------------------+ | jeffo@uiuc.edu (Internet) These opinions are mine, that's all.| +----------------------------------------------------------------------------+