A "Menu Prompt" for Naive Users (Unix Power Tools, 3rd Edition)
4.9. A "Menu Prompt" for Naive Users
Some people don't want
to be faced with a Unix % or $
shell prompt. If you (or, if you're a sys admin on a
multiuser system, your users) usually run only a few particular Unix
commands, you can put those
command names in the shell
prompt. Here's a simple one-line Bourne-shell prompt
for a .profile:
PS1='Type "rn", "mailx", "wp", or "logout": '
Next, a multiline prompt (Section 4.7) for the C shell .cshrc
or .tcshrc file:
if ($?prompt) then
set prompt='\\
Type "pine" to read the news,\\
type "mutt" to read and send mail,\\
type "wp" for word processing, or\\
type "logout" to log out.\\
YES, MASTER? '
endif
You get the idea.
--JP and SJC
4.8. Session Info in Window Title or Status Line4.10. Highlighting and Color in Shell Prompts
Copyright © 2003 O'Reilly & Associates. All rights reserved.
Wyszukiwarka
Podobne podstrony:
ch04ch04 (13)ch04 (2)ch04ch04ch04ch04ch04ch04ch04 (4)ch04ch04CH04 (11)ch04ch04ch04ch04ch04więcej podobnych podstron