Implement command history
Implement command history
And here's the second question that I've been thinking about.
Does anyone know of anything that implements a command history? I'm thinking of a Unix/DOS type shell where you could press up and down arrow to work through the last few commands entered. I imagine you possibly can't get do this but if there was a way to intercept or hijack keypresses then you could probably cover the whole up/down thing, and the only real problem would be a way of capturing the 'line' before the QL processed it. So you'd also have to hijack the return key, I guess, store the line in a buffer, then allow the QL to process the line as usual.
If this is all well trodden ground, completely impossible due to certain QL internals that most of you already understand and know about, please just shoot me down and I'll look for another problem to tackle. But it there are things a little like this out there, it might be interesting to try and play with it - I certainly find entering direct commands a pain without some element of line-history.
Does anyone know of anything that implements a command history? I'm thinking of a Unix/DOS type shell where you could press up and down arrow to work through the last few commands entered. I imagine you possibly can't get do this but if there was a way to intercept or hijack keypresses then you could probably cover the whole up/down thing, and the only real problem would be a way of capturing the 'line' before the QL processed it. So you'd also have to hijack the return key, I guess, store the line in a buffer, then allow the QL to process the line as usual.
If this is all well trodden ground, completely impossible due to certain QL internals that most of you already understand and know about, please just shoot me down and I'll look for another problem to tackle. But it there are things a little like this out there, it might be interesting to try and play with it - I certainly find entering direct commands a pain without some element of line-history.
Re: Implement command history
(Though in true fashion, I was in the TK2 manual a little while ago looking for something else and discovered the ALT-ENTER function; while not exactly giving me a scrollable command history, it's certainly useful to be able to get the last command 'back' like that).
Re: Implement command history
Look for "history" on Dilwyn's site at http://www.dilwyn.me.uk/tk/index.html
TK2 command callback using <ALT>+<ENTER> is nice, but normally recalls exactly the command line before the one I was looking for...
Tobias
TK2 command callback using <ALT>+<ENTER> is nice, but normally recalls exactly the command line before the one I was looking for...
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
-
- Font of All Knowledge
- Posts: 4005
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Implement command history
Hi,
Why not look at Dilwyn's web site under the Toolkit section there is a History extension that will allow scrolling back and forwards with the cursor keys.
Why not look at Dilwyn's web site under the Toolkit section there is a History extension that will allow scrolling back and forwards with the cursor keys.
Regards,
Derek
Derek
Re: Implement command history
Ah, thanks guys - not only does that confirm that it can be done, but that it might already have been done - cheers
Re: Implement command history
> not only does that confirm that it can be done, but that it might already have been done
Might? No, it has been done. I've been using the history device driver since the late 90's.
Tim Swenson
Might? No, it has been done. I've been using the history device driver since the late 90's.
Tim Swenson
Re: Implement command history
Sorry for bringing an old thread back but it seemed better than starting a new one
I've tried the History 1.23 & 1.27 on Dilwyn's download page and on both a real QL and Q-emuLator I Just get a black screen and a hang as soon as I lrespr the cde file
Any ideas please?
Many thanks
Tony
I've tried the History 1.23 & 1.27 on Dilwyn's download page and on both a real QL and Q-emuLator I Just get a black screen and a hang as soon as I lrespr the cde file
Any ideas please?
Many thanks
Tony
-
- Over Heated PSU
- Posts: 144
- Joined: Tue Nov 30, 2021 1:19 am
Re: Implement command history
I don't use the pointer environment or know anything about it (but Dilwyn's site says it can be used without PE), or is this just a utility please?
Many thanks