From owner-freebsd-current@FreeBSD.ORG Tue Nov 20 01:36:45 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CAE359A for ; Tue, 20 Nov 2012 01:36:45 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6F71F8FC17 for ; Tue, 20 Nov 2012 01:36:44 +0000 (UTC) Received: by mail-vc0-f182.google.com with SMTP id fo13so7548561vcb.13 for ; Mon, 19 Nov 2012 17:36:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=AFNK5QWBCqfbwken8iY/vjmPJpslxfN1Nij/mk3tlCQ=; b=WIkJg8IkO5RcRK44jJDCR6LjHDX6UP4uvi8wl/Yko21Ao6pBVjhelmDfeqV8gy+v/O Fnl77tTgoLjOPPFinoklXEk2BozfYbhU9GHNOFHOh46JMD8FqUbADxJaLR76eOWpXTnv cYfvYYhLLWWBaJEAeOx6R+uPx9hFVkyE3neac= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=AFNK5QWBCqfbwken8iY/vjmPJpslxfN1Nij/mk3tlCQ=; b=PZtpQZp3rT1XBjrUMQ/Kt566+yQ0t7nTU9Etg+yG8RtymBA5td1oa/JFlkqzdvA6CA v46Vg4h8EkIxa8uop/jNz4ffj1g0DHi8R50WoKF6HFjduUnXZP+qZ4dwojM8yuVpI6Gj qJg8TxruucWDFFD+2rrCMoWOTMZ7YZhKKsp5XKC14N+GUc7nFFTBdvrEMU3lZ/Q+k1QV nYtoaMPknSMHHFRhPt7o1Yk384+tmVUK9HBqcHOARfP8LuSOugk9DMPNZJCeEEVZsaWD +iszgE7eGEKwggaw69ffqMwlk103PelbiOxGfDMNDwvuRhsQaTin4ZYRc9hb7+06IOW3 sDmQ== Received: by 10.58.145.161 with SMTP id sv1mr19823601veb.52.1353375404123; Mon, 19 Nov 2012 17:36:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.4.197 with HTTP; Mon, 19 Nov 2012 17:36:13 -0800 (PST) In-Reply-To: References: From: Eitan Adler Date: Mon, 19 Nov 2012 20:36:13 -0500 Message-ID: Subject: Re: prompt w/ uid 0 for cshrc To: freebsd-current Current Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmk4HmOCUbQczRHPjAFuIvKhU1NurnYKOY2yEHyTZV/vWWTmaNQATwZRT0VdDATDawP6bDq X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Nov 2012 01:36:45 -0000 On 18 November 2012 18:32, Eitan Adler wrote: > Hey, > > at the moment the current default csh prompt looks like > > user@hostname:directory% command > > This leads to an unexpected[*] result when using su (without "-"). > > In particular the user part is *not* changed to "root" (or "toor" or > any other superuser indication) although the promptchar is changed to > "#". > This causes some confusion for new users and even some experienced ones. > > I worked around this issue by including the following > > if ($uid == 0) then > set user = root > endif > > which I'm not certain is a good idea. > > I would like to replace this with logic like > > if $uid = 0 AND $user != toor AND $user != root > set user = "+$user" > endif > > does anyone think this is a bad idea? can anyone propose a better > idea? Is the status quo okay? ... I was pointed in the right direction. I should use %N instead of %n. -- Eitan Adler