Implement command history

Anything QL Software or Programming Related.
robsoft
ROM Dongle
Posts: 42
Joined: Wed Jun 15, 2016 5:14 pm

Implement command history

Post by robsoft »

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.


robsoft
ROM Dongle
Posts: 42
Joined: Wed Jun 15, 2016 5:14 pm

Re: Implement command history

Post by robsoft »

(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).


User avatar
tofro
Font of All Knowledge
Posts: 2702
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Implement command history

Post by tofro »

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


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Derek_Stewart
Font of All Knowledge
Posts: 3975
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Implement command history

Post by Derek_Stewart »

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.


Regards,

Derek
robsoft
ROM Dongle
Posts: 42
Joined: Wed Jun 15, 2016 5:14 pm

Re: Implement command history

Post by robsoft »

Ah, thanks guys - not only does that confirm that it can be done, but that it might already have been done - cheers :-)


swensont
Forum Moderator
Posts: 252
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: Implement command history

Post by swensont »

> 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


User avatar
t0nyt
Gold Card
Posts: 385
Joined: Wed Nov 22, 2023 6:46 pm
Location: UK

Re: Implement command history

Post by t0nyt »

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


ones' complement
Over Heated PSU
Posts: 133
Joined: Tue Nov 30, 2021 1:19 am

Re: Implement command history

Post by ones' complement »

LRESPR PTR_GEN first ?


User avatar
t0nyt
Gold Card
Posts: 385
Joined: Wed Nov 22, 2023 6:46 pm
Location: UK

Re: Implement command history

Post by t0nyt »

ones' complement wrote: Wed Mar 13, 2024 3:45 pm LRESPR PTR_GEN first ?
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


User avatar
desin
Chuggy Microdrive
Posts: 54
Joined: Mon May 10, 2021 10:33 am

Re: Implement command history

Post by desin »

boot disk
QPAC1440.zip
(790.97 KiB) Downloaded 20 times
Greetings from Switzerland
Markus


Post Reply