User Tools

Site Tools


vps_-_plan9front_-_fn_reply_and_prompt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
vps_-_plan9front_-_fn_reply_and_prompt [2022/06/27 01:16] – [function (fn)] hc9vps_-_plan9front_-_fn_reply_and_prompt [2022/07/19 19:42] – [prompt] hc9
Line 116: Line 116:
 |**2.**|//If you make frequent use of cpu's -''h'' and ''-u'' arguments, this variant keeps track of the host you are connected to, and as which user://| |**2.**|//If you make frequent use of cpu's -''h'' and ''-u'' arguments, this variant keeps track of the host you are connected to, and as which user://|
 |//a.//|''<nowiki>prompt = (`{cat /dev/user}^@^`{cat /dev/sysname}^'% '  ' ')</nowiki>''| |//a.//|''<nowiki>prompt = (`{cat /dev/user}^@^`{cat /dev/sysname}^'% '  ' ')</nowiki>''|
-|//b.//|''<nowiki>fn `{echo $prompt(1) | tr -d ' '} { $* }</nowiki>''|+|//a.//|''<nowiki>fn `{echo $prompt(1) | tr -d ' '} { $* }</nowiki>''
 +|**3.**| 
 +|//a.//|''<nowiki>prompt=('['^`{pwd}^'] '^$sysname^'% ' ' ')</nowiki>''
 +|//b.//|''<nowiki>fn cd {builtin cd $* && prompt=('['^`{pwd}^'] '^$sysname^'% ' ' ')}</nowiki>''|
  
 **Example #1:** **Example #1:**