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

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
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 © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.