"Joe Wood" <joew@ndirect.co.uk> writes:
> Date: Tue, 4 Jun 2002 21:28:41 +0100
>
> Having installed Redhat 7.3, and rebuilt poplog all went fine until I
> happened to use imsh in ved.
Just out of curiosity, did imsh work OK in earlier versions of
Redhat?
I was wondering whether bash had changed in RedHat 7.3 or whether
you simply had not tried this in earlier versions of poplog on
linux. I seem to remember that ved_imcsh worked fine but I had
problems with ved_imsh (using 'sh', not 'bash' as shell).
I suppose that in principle it should be possible to create
a library ved_imbash by copying and editing everything that
is used in ved_imsh. It could then run bash with the
'--noediting' flag.
Here's a much simpler stopgap, if all you want to do is repeatedly run
bash with a command and read the output of the command back into Ved.
(I do this with tcsh all the time).
Put this in $poplocal/local/auto/ved_dobash.p
or your private autoloadable directory:
define ved_dobash();
;;; Use the current line in the Ved buffer as an argument
;;; for bash. Run bash with the argument, and read the
;;; output back into a temporary Ved file, with the heading
;;; FROM BASH
dlocal vedargument = copy(vedthisline());
vedgenshell('/bin/bash', 'FROM BASH');
enddefine;
Then you can put a command, e.g.
who
in the Ved buffer, but the cursor on it, and do ENTER dobash.
Obviously you can abbreviate the name if you wish. Or you can use
vedsetkey to map that onto a key sequence or functionkey. (The REDO
key can be used to repeat the ENTER command after editing the
bash command.)
This will not work if you want to run interactive programs launched via
bash from inside a Ved buffer. But those rarely work in any case.
Aaron
====
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk (ReadATas@please !)
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/ (And free book on Philosophy of AI)
FREE TOOLS: http://www.cs.bham.ac.uk/research/poplog/freepoplog.html
|