Save Replaced Command

Posted by MUSHuser on Fri 01 Oct 2010 01:54 PM — 11 posts, 47,869 views.

#0
http://www.gammon.com.au/scripts/doc.php?dialog=IDD_COMMAND_OPTIONS

If you look at the commands on that page, you will notice "Save Deleted Command" and "Confirm Before Replacing Typing". While the former is very useful, it is often limited by forgetting to press Esc. The latter happens to be just plain annoying so I don't use it.

So, what happens when I am typing something long and press the up or down arrow to navigate to an area to edit? More often than not, I end up transversing the history and losing everything I typed. This happens to me more frequently with the down arrow, since I have a habit of using it to get to the end of my input.

It's true that I can disable "Arrow Keys Traverse History", but that would be much less convenient. That's why I'm suggesting a new option, "Save Replaced Command", that would be sort of an extension to "Save Deleted Command". This would allow the user to transverse as normal without confirmation. Any newly inputted commands that are replaced but not sent would simply be appended to the end of the history.

Alternatively... we can have it so that pressing the down arrow while inputting a command does not automatically clear it. Or the down arrow can act like Esc key (basically about half of my original suggestion).
USA #1
I think these are fantastic ideas. I agree, confirm before replacing typing is extremely annoying. Everyone I know that uses MUSH feels the same.
USA #2
Turn on "Arrow keys recall partial command", then if there's no other matching history commands, down arrow won't clear the input box... forcing you to hit esc to clear it.
Australia Forum Administrator #3
The prompt about "Replace your typing of ..." only occurs if you are at the very start or very end of your typing. I know it is annoying, but if you are half-way through your message the arrow keys just move you through it.

Would it be better if the "Save deleted command" also applied to replaced commands? Then if you do up or down arrow to find your typing disappear you just arrow again to get it back.
USA #4
Nick Gammon said:
Would it be better if the "Save deleted command" also applied to replaced commands? Then if you do up or down arrow to find your typing disappear you just arrow again to get it back.

That's how the Linux bash shell works, among a number of other things. I think that would be a great change.
Australia Forum Administrator #5
Changed in version 4.64 so that if you have "Save Deleted Command" checked, then using the arrow-keys to change the contents of the command window counts as deleting it.

So in other words, you can leave "Confirm before replacing typing" unchecked, and not lose a lengthy thing you have typed, just because you hit the arrow key. Instead, it is saved in the command history buffer.
#6
Nick Gammon said:

Changed in version 4.64 so that if you have "Save Deleted Command" checked, then using the arrow-keys to change the contents of the command window counts as deleting it.

So in other words, you can leave "Confirm before replacing typing" unchecked, and not lose a lengthy thing you have typed, just because you hit the arrow key. Instead, it is saved in the command history buffer.



Thank you so much!
#7
I apologize in advanced for being so meticulous. I have another suggestion regarding these preferences that I felt I should share. If it is deemed unnecessary, feel free to bypass it.

Let's say I transverse up five commands in my command history. If I edit it and press Esc, it clears the command from the command window and saves it to the end of my command history. This is all perfect. However, when I transverse up again, it takes me to the sixth (seventh if you count the saved one) command in my history. I am not sure if this is intentional because it may be preferable that way. It just seems kind of awkward for the saved command to not be the first one to transverse since that is normally the case when you use Esc. My suggestion would just be to make Esc also reset the transverse point as if you entered a command.

(The documentation should probably be updated for "Save Deleted Command" to add that it can save commands that are deleted when you transverse the command history.)

PS: I know that you're always on top of forum messages, Nick. I'm also too lazy to make a new subject so I will just mention it here. If you select Yes to "Preload world defaults from an existing world?" when trying to create a new world, you are not actually creating a new world. You are essentially opening a world and going into the "World Properties". If you save the world, you end up overwriting the file you preloaded from!
Australia Forum Administrator #8
Quote:

However, when I transverse up again, it takes me to the sixth (seventh if you count the saved one) command in my history. I am not sure if this is intentional because it may be preferable that way.


That wasn't intentional I don't think, but no-one else has complained.

Quote:

If you save the world, you end up overwriting the file you preloaded from!


I thought that was fixed in a recent release, what version are you using?
#9
I'm using version 4.73.
Australia Forum Administrator #10
http://www.gammon.com.au/forum/?id=11480

Version 4.76:

Quote:

7. Got rid of dialog "Preload world defaults from an existing world?" when creating a new world file. This was confusing, didn't preload plugins, and had the potential to wipe out settings in the world you were preloading from.