Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Mar 96 15:36:16 +0100
From:      cracauer@wavehh.hanse.de (Martin Cracauer)
To:        mikec@mediacity.COM
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to make current directory show at the commandline?
Message-ID:  <9603131436.AA29020@wavehh.hanse.de>
References:  <31468A3B.28B6@mediacity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>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.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9603131436.AA29020>