Date: Wed, 13 Mar 1996 11:25:53 -0600 From: "Paul T. Root" <ptroot@uswest.com> To: freebsd-questions@freebsd.org Cc: mikec@mediacity.com Subject: Re: How to make current directory show at the commandline? Message-ID: <31470521.B9F@uswest.com> References: <31468A3B.28B6@mediacity.com> <9603131436.AA29020@wavehh.hanse.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Martin Cracauer wrote:
>
> >I would like the current directory that I am at to display at the command
> >line like it does in DOS. Is there anyway to emulate this?
>
> Yu should have told us which shell you use.
>
> If you use bash, zsh or tcsh, RTFM.
This isn't always very useful.
In bash its simple:
PS1="\h:\w \t \! % "
\h hostname
\w pwd
\t time
\! command number
> In csh, you can put this into you .cshrc:
> vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
> alias SetPrompt 'set prompt="${myhost} [`pwd2`]-\\!% "'
>
> alias cd 'cd \!* && SetPrompt'
> alias cdl 'cd \!*; ls'
> alias popd 'popd \!* && SetPrompt'
> alias pushd 'pushd \!* && SetPrompt'
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> --
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> Martin Cracauer <cracauer@wavehh.hanse.de> - Fax +49 40 522 85 36
> BSD User Group Hamburg, Germany http://www.bik-gmbh.de/~cracauer
--
Paul T. Root E/Mail: ptroot@uswest.com
200 S. 5th St. Suite 1100 PAG: +1 (800) SKY-PAGE PIN: 537-7370
Minneapolis, MN 55402 WRK: +1 (612) 663-1979
NIC: PTR FAX: +1 (612) 663-8030
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?31470521.B9F>
