Skip site navigation (1)Skip section navigation (2)
Date:      29 May 1999 13:38:48 +0200
From:      naddy@mips.rhein-neckar.de (Christian Weisgerber)
To:        freebsd-questions@freebsd.org
Subject:   Re: why we don't mess with root's shell: Re: Need help with  Root shell?
Message-ID:  <7iojk8$t21$1@mips.rhein-neckar.de>
References:  <7imjo4$kef$1@mips.rhein-neckar.de> <Pine.BSF.3.96.990528132219.24883C-100000@andrsn.stanford.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Annelise Anderson <andrsn@ANDRSN.STANFORD.EDU> wrote:

> Suppose FreeBSD were to provide as a default shell for root and
> for users something with a few more features than sh and csh--
> filename completion,

Actually, csh has a rudimentary filename completion facility.

> command recall and editing,

FreeBSD's sh has this.

> a prompt easy to configure to tell you who you are and where you are.

The following works quite well in our sh. I'll reserve judgment whether
it is easy to configure.

# Prompt
prompt=${USER}@$(hostname -s)
cd()
{
  command cd "$@"
  case $PWD in
    "${HOME}"*) PS1="${prompt}[~${PWD#"${HOME}"}] " ;;
    *)          PS1="${prompt}[${PWD}] " ;;
  esac
}
cd $PWD         # initialize prompt

-- 
Christian "naddy" Weisgerber                  naddy@mips.rhein-neckar.de
    carpe librum: books 'n' reviews <URL:http://www.carpe.com/buch/>;



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7iojk8$t21$1>