Re: prompt w/ uid 0 for cshrc

看板FB_current作者時間12年前 (2013/04/27 12:33), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/7 (看更多)
On Sun, Nov 18, 2012 at 06:32:20PM -0500, 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? > Just take user name from id -nu. -- Mateusz Guzik <mjguzik gmail.com> _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1HUrK0do (FB_current)
文章代碼(AID): #1HUrK0do (FB_current)