User Tools

Site Tools


playground: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 revision
Previous revision
Next revisionBoth sides next revision
playground:vps_-_plan9front_-_fn_reply_and_prompt [2022/06/24 22:38] – [function (fn)] hc9playground:vps_-_plan9front_-_fn_reply_and_prompt [2022/06/26 05:19] – [function (fn)] hc9
Line 7: Line 7:
  
 ^#^Examples^ ^#^Examples^
-|1|fn vim { sam $* }| +|**1.**|...[[:resources_for_website_builders#editing_text|“vim”]] and “emacs” which offer an unmatched degree of customization.| 
-|2| [blank] +|//a.//|''fn vim { sam $* }''
-|3| [blank] |+|**2.**|//Grep, but force listing of filename:lineno so you can click on an entry to jump to it in an editor.//
 +|//a.//|''fn gn { grep -n $* /dev/null }''
 +|**3.**|//Tree enumerator (simple "find") useful for many purposes//| 
 +|//a.//|''fn f { du -a $* <nowiki>|</nowiki> sed 's/^.*// ((This whitespace is a tab.))//<nowiki>//</nowiki>g' }'' ⇐ that whitespace is a tab| 
 + 
 +**Example #1:** 
 + 
 +<code> 
 +cpu% lc profile.edit 
 +profile.edit 
 +cpu% sam -d profile.edit 
 + -. profile.edit 
 +/fn 
 +fn 
 + fn term%{ $* } 
 +/fn 
 +fn 
 + fn cpu%{ $* } 
 +
 + fn vim { sam $* } 
 +
 +
 +profile.edit: #991 
 +
 +cpu% 
 +</code> 
 + 
 +<code> 
 +cpu% whatis vim 
 +fn vim { 
 + sam $* 
 +
 +cpu% 
 +</code>
  
 ===== reply with selected text ===== ===== reply with selected text =====
Line 23: Line 56:
 |4|use the button 1,3 chord to paste text into reply| |4|use the button 1,3 chord to paste text into reply|
 |5|remove Include: line from message and type your reply.| |5|remove Include: line from message and type your reply.|
 +
 +Start acme to access the mbox.
 +
 +<code>
 +  % acme
 +</code>
 +
 +^Newcol Kill Putall Dump Exit^^^
 +|**New Cut Paste Snarf Sort Zerox Delcol**|:::|
 +
 +^Newcol Kill Putall Dump Exit^^^
 +|**New Cut Paste Snarf Sort Zerox Delcol**|:::|⇐ Add //Mail// by typing ''Mail''.|
 +
 +^Newcol Kill Putall Dump Exit^^^
 +|**New Cut Paste Snarf Sort Zerox Delcol Mail**|:::|⇐ Mouse button 2 press //Mail//.|
 +
 +^Newcol Kill Putall Dump Exit^^^
 +|**New Cut Paste Snarf Sort Zerox Delcol Mail**|
 +|**///mail/fs/mbox//** **Del Snarf : Look Put Mail Delmesg Undelmesg Next**|
 +|2/|:::|⇐ An Email messages is here.|
 +|1/|
 +|**///mail/fs/mbox/2///** **Del Snarf : Look Reply all Mail Delmesg Save |ireply**|:::|⇐ Mouse button 2 press //|ireply// after highlighting the text to include in the reply, then mouse button 2 press //Reply//.|
 +|From: ne1nb00k@9p.sdf.org|
 +|To:   ne1nb00k@9p.sdf.org|
 +|Date: Fri Jun 24 23:06:59 +0000 2022|
 +|Subject: practice reply|
 +|[blank]|
 +|That was some good neinbook!|
 +|[blank]|
 +|> Some text to reply to|:::|⇐ This is the text highlighting example area.|
 +|[blank]|
 +|Other text|
 +|Other text|
  
 ===== prompt ===== ===== prompt =====
 +
 +<code>
 +  cpu% cp $home/lib/profile $home/lib/profile.bak
 +</code>
  
 ^#^Examples^ ^#^Examples^
-|**1**|To set your prompt in rc to reflect your current directory add this to your profile.|+|**1**|//To set your prompt in rc to reflect your current directory add this to your profile.//|
 |//a//|''<nowiki>fn cd { builtin cd $* && prompt=(`{pwd}^% '' ) }</nowiki>''| |//a//|''<nowiki>fn cd { builtin cd $* && prompt=(`{pwd}^% '' ) }</nowiki>''|
-|**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>''| |//b//|''<nowiki>fn `{echo $prompt(1) | tr -d ' '} { $* }</nowiki>''|
 +
 +**Example #1:**
 +
 +<code>
 +cpu% lc profile.edit
 +profile.edit
 +cpu% sam -d profile.edit
 + -. profile.edit
 +/fn
 +fn
 + fn term%{ $* }
 +/fn
 +fn
 + fn cpu%{ $* }
 +s/cpu%{ \$\*/cd { builtin cd $* \&\& prompt=(`{pwd}^% '' )
 +.
 + fn cd { builtin cd $* && prompt=(`{pwd}^% '' ) }
 +w
 +profile.edit: #1007
 +q
 +cpu%
 +</code>
 +
 +<code>
 +cpu% whatis cd
 +fn cd {
 + builtin cd $* && prompt=(`{
 + pwd
 + }^% '')
 +}
 +cpu%
 +</code>