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 revision
Previous revision
Last revisionBoth sides next revision
vps_-_plan9front_-_fn_reply_and_prompt [2022/06/26 05:57] – [reply with selected text] hc9vps_-_plan9front_-_fn_reply_and_prompt [2022/07/19 19:47] hc9
Line 1: Line 1:
 ====== function, reply and prompt ====== ====== function, reply and prompt ======
  
-|x| :!: THIS IS A DRAFT| 
 |x| Tutorial [ ] Guide [x]| |x| Tutorial [ ] Guide [x]|
  
Line 7: Line 6:
  
 ^#^Examples^ ^#^Examples^
-|**1.**|...[[:resources_for_website_builders#editing_text|“vim”]] and “emacs” which offer an unmatched degree of customization.|+|**1.**|...[[resources_for_website_builders#editing_text|“vim”]] and “emacs” which offer an unmatched degree of customization.|
 |//a.//|''fn vim { sam $* }''| |//a.//|''fn vim { sam $* }''|
 |**2.**|//Grep, but force listing of filename:lineno so you can click on an entry to jump to it in an editor.//| |**2.**|//Grep, but force listing of filename:lineno so you can click on an entry to jump to it in an editor.//|
Line 13: Line 12:
 |**3.**|//Tree enumerator (simple "find") useful for many purposes//| |**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| |//a.//|''fn f { du -a $* <nowiki>|</nowiki> sed 's/^.*// ((This whitespace is a tab.))//<nowiki>//</nowiki>g' }'' ⇐ that whitespace is a tab|
 +|**4.**| [[vps_-_plan9front_-_acme_sam_abaco_mothra_and_man#acme|acme]] |
 +|//a.//|''fn acme { /bin/acme -b -c 1 $* }''|
  
 **Example #1:** **Example #1:**
Line 47: Line 48:
  
 ===== reply with selected text ===== ===== reply with selected text =====
 +
 +|x|''|ireply'' is mentioned as an rc example, while an ''acme'' **Reply** is available.|
 +
 +=== ireply: ===
  
 <file config $home/bin/rc/ireply> <file config $home/bin/rc/ireply>
Line 54: Line 59:
  
 |1.|select text to include in reply with button 1| |1.|select text to include in reply with button 1|
-|2.|type **''|ireply''** in message tag and run with button 2|+|2.|//type((Prepend ''ireply'' with the pipe (''|'').))// **''|ireply''** in message tag and run with button 2|
 |3.|run **''reply''** in message tag with button 2| |3.|run **''reply''** in message tag with button 2|
 |4.|use the button 1,3 chord to paste text into reply| |4.|use the button 1,3 chord to paste text into reply|
Line 111: 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 Plan 9 Boot Camp user contributed prompt.| 
 +|//a.//|''<nowiki>prompt=('['^`{pwd}^'] '^$sysname^'% ' ' ')</nowiki>''
 +|//b.//|''<nowiki>fn cd {builtin cd $* && prompt=('['^`{pwd}^'] '^$sysname^'% ' ' ')}</nowiki>''|
  
 **Example #1:** **Example #1:**