This is an old revision of the document!
function, reply and prompt
x | THIS IS A DRAFT |
x | Tutorial [ ] Guide [x] |
function (fn)
# | Examples |
1 | fn vim { sam $* } |
2 | [blank] |
3 | [blank] |
reply with selected text
- $home/bin/rc/ireply
#!/bin/rc
awk '{ print "> " $0}'
1 | select text to include in reply with button 1 |
2 | type |ireply in message tag and run with button 2 |
3 | run reply in message tag with button 2 |
4 | use the button 1,3 chord to paste text into reply |
5 | remove Include: line from message and type your reply. |
Start acme to access the mbox.
% acme
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. |
prompt
# | Examples |
1 | To set your prompt in rc to reflect your current directory add this to your profile. |
a | fn cd { builtin cd $* && prompt=(`{pwd}^% '' ) } |
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 | prompt = (`{cat /dev/user}^@^`{cat /dev/sysname}^'% ' ' ') |
b | fn `{echo $prompt(1) | tr -d ' '} { $* } |