Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Suggestions ➜ Arrow keys recalling partial command suggestion

Arrow keys recalling partial command suggestion

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Fri 31 Jan 2003 06:38 PM (UTC)
Message
The way it is now, if you wrote "say hehehe", then "say hello" 10 times, and write "say he" and press the up arrow or whatever you use for completion, MUSHClient would display the 10 "say hello" commands before going to "say hehehe". That is a bit useless, because you already implied you didn't want "say hello" the first time you saw it. My suggestion is that MUSHClient should check if the next completion command is the same as the previous one, and if true, omit it by going to the next one, where it will check again, and so on... Also, another suggestion would be that MC didn't show "say hello" as a suggestion if you typed "say hello" and press the up button, but instead, show the next suggestion, which might be "say hello there!". That would be the same code as the 1st suggestion, but it would include the command you typed in the first command variable. I don't know if you understand it, so here are examples:
The commands "say hello there", "say hello", "say hello", "say hello", and "say hello" are in the buffer. You type "say he" and press the up arrow. MC would put "say he" in a variable, and seek the previous command, which would be "say hello". Then, "say hello" would be set as the variable. You press the up arrow again, because that's not what you want. MC looks for the next command, which is again "say hello", compares it against the var and sees that you already turned that one down. Then MC goes through the commands until it reaches "say hello there", and displays it to you. You want that, and press enter.
On the second scenario, you write "say hello" and press the up arrow. Since that is the command in the variable, MC skips all the "say hello"s and goes directly to "say hello there!", because if you wanted "say hello" you'd just press enter.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 31 Jan 2003 10:44 PM (UTC)
Message
Added as suggestion #484.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #2 on Thu 01 May 2003 12:30 AM (UTC)
Message
But if you enter "say hello" 10 times it only stores it in the history buffer once, so the problem goes away - doesn't it?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Magnum   Canada  (580 posts)  Bio
Date Reply #3 on Thu 01 May 2003 02:31 AM (UTC)
Message
You can currently use ALT-UP to recall previous commands based on text you have entered in the command box.

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #4 on Thu 01 May 2003 09:23 AM (UTC)
Message
It does store consecutive commands as one, but if you enter:
say hello
bow
say hello
bow
it'll store all of these, i.e. twice each

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #5 on Thu 01 May 2003 10:15 PM (UTC)

Amended on Thu 01 May 2003 10:16 PM (UTC) by Nick Gammon

Message
I read your original post to mean you had entered "say hello" 10 times, not "bow / say hello" 10 times.

However I am reluctant to start fiddling with this. Effectively there could be an unlimited number of things that have to be remembered and discarded.

eg. You enter:

say hello
say heap
say help
say hero

... and then do the same 4 commands 20 times.

But before that you had "say hemp".

Now you are using "partial recall" to find "say hemp", and you type "say he" and up-arrow.

You are suggesting that as it hits "say hero" and you keep going it remembers that. Then you find "say help" and you keep going, so it remembers that too, and so on, so it has to keep remembering a list of things you have discarded.

Can't say I am keen, it sounds fiddly. First, the code is already complex because it isn't really a simple loop, each time you hit up-arrow it has to deduce what happened last time, because that was a previous event, it doesn't just get a nice list of up-arrows to process. Having to deduce whether you are going up or down, whether you are at the end of the list, what you have already rejected, and when to clear the rejection list, is just too much.

In my example, you can make it easier for yourself by expanding your criteria, eg. type "say hem" and then hit up-arrow.

Alternatively, use Ctrl+H to bring up the history list and choose the command from there.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #6 on Fri 02 May 2003 12:51 PM (UTC)
Message
Hmm, i think we lost each other on this one. Imagine this scenario. There is "say hello" in the command box. I want to complete to "say hello there", but i have typed "say hello" a few times. When i press the up arrow, the program should look for the next completion. If the completion is "say hello", it is useless, because i wouldn't want to complete to what's in the box already, so it should skip that, and search for the next occurence. It's a simple "If commandbox == recalledcommand Then continue".
Correct me if i missed something.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #7 on Fri 02 May 2003 12:53 PM (UTC)
Message
Hmm i see your point... but still, sometimes, it takes 10 "say hello"s to get to the "say hemp" that's on top, so only remembering one would be some help, and still easy to implement, i believe...

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #8 on Fri 02 May 2003 10:10 PM (UTC)
Message
OK, I can accept that.

I have changed it so that if you type in a command, and then alt+up arrow to find something that matches, an *exact* match won't count, otherwise there wasn't much point in doing the search.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


19,996 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.