Plan 9 from Bell Labs’s /usr/web/sources/contrib/lyndon/prompt.rc

Copyright © 2009 Alcatel-Lucent.
Distributed under the Lucent Public License version 1.02.
Download the Plan 9 distribution.


# Add this to your lib/profile to get a smart rc command prompt
# that reflects your current username, host, and working directory.
# E.g.
#	: lyndon@frodo:/usr/lyndon;
# The prompt string is a no-op and can be passed harmessly back
# to rc should you want to send several lines of snarfed text
# back into the window.

fn : {}
fn setprompt {
	prompt = (': '^`{cat /dev/user}^@^`{cat /dev/sysname}^':'^`{pwd}^'; '  '	')
}
fn cd { builtin cd $* && setprompt }
setprompt

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2009 Alcatel-Lucent. All Rights Reserved.
Comments to webmaster@plan9.bell-labs.com.