Using your own editor

From ScarletDME
Revision as of 20:29, 17 March 2009 by Geneb (talk | contribs)
Jump to navigation Jump to search

This little script was given to me by Tom Hoogenboom:

To use your favorite editor, just change "leafpad" to "vi", "pico", etc.

Save the program below in your GPL.BP file and globally catalog it.

* 'nano' caller for system editor
s = @sentence
s = trim(s)
convert ' ' to @am in s
filename = s<2>
itemname = s<3>
*
es = \sh nano \:@path:\/\:filename:\/\:itemname
crt es
execute es
*
end

Note - this currently doesn't work when OpenQM is executed by xinetd under 2.6-6. If you execute OpenQM from the command line it works ok. It appears that the I/O redirection is somehow broken when OpenQM is executed as a server (accessed via telnet <hostname> <port>)