So, I want to write my own shell so I can various things, including suspending, resuming and running in the background for programs. I went through and read all the APIs and I could not find anything that sounds like it work. Does anyone know a way to intercept the output stream for a terminal? That way I can customize it to my likely.
If you want to know what I mean, I want to be able to get a return value from print() or term.write() or be able to know whenever they are ran or I want to be able to get the output of build in commands like ls something.
[Question] Intercepting terminal output stream
Started by angellus, May 17 2013 06:06 PM
5 replies to this topic
#1
Posted 17 May 2013 - 06:06 PM
#3
Posted 18 May 2013 - 10:27 AM
That is basically what I was writing. Thanks. It should save me a lot of trouble.
EDIT: in fact, looking at your KaoShell, it already has a lot of the functionality I need. I will probably get ideas from it in making my own.
EDIT: in fact, looking at your KaoShell, it already has a lot of the functionality I need. I will probably get ideas from it in making my own.
#4
Posted 18 May 2013 - 12:03 PM
angellus, on 18 May 2013 - 10:27 AM, said:
That is basically what I was writing. Thanks. It should save me a lot of trouble.
EDIT: in fact, looking at your KaoShell, it already has a lot of the functionality I need. I will probably get ideas from it in making my own.
EDIT: in fact, looking at your KaoShell, it already has a lot of the functionality I need. I will probably get ideas from it in making my own.
Great
#5
Posted 19 May 2013 - 07:16 PM
Hello KaoS, would it be possible to use your layering api to determine if a certain text has been output to the terminal? I am executing a command from terminal, and redirecting the output to the terminal, however, the amount of time that passes until the command finishes writing it's output varies, and so the only real way to make sure all status text is displayed, is to somehow be able to look for keywords within the text printed to the terminal, to look for either, an error code, a success code, a waiting code, etc.
#6
Posted 19 May 2013 - 08:19 PM
yeah use the term.getTextAt feature to recall text from the screen
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











