Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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.
Entire forum
➜ MUSHclient
➜ Suggestions
➜ Eliminate duplicates in command history
Eliminate duplicates in command history
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| godefroi
(17 posts) Bio
|
Date
| Mon 16 Aug 2004 07:11 PM (UTC) |
Message
| Similar to the "Discard Old Duplicates" option for the command prompt in Windows, or the HISTCONTROL=ignoredups option for the bash shell in *nix.
Basically, it means that if a command is already in the command history, it removes it before adding it again so you don't get duplicates. If you entered commands such as the following:
a
b
b
a
c
d
Currently you'd get d,c,a,b,a in your command history. If you enabled this option you should get d,c,a,b in your history.
| Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #1 on Mon 16 Aug 2004 08:50 PM (UTC) |
Message
| But that would break any scripts that send the "last command" from the history. History is what youve sent, in order. What would the purpose of an option such as this? |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #2 on Tue 17 Aug 2004 09:17 PM (UTC) |
Message
| No, he means remove it from history before adding it. Such an option would be useful and would reduce the time it takes to browse the history... Can it be easily implemented? |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Gedrean
USA (12 posts) Bio
|
Date
| Reply #3 on Wed 18 Aug 2004 05:42 PM (UTC) |
Message
| Such a feature would be good only if it were optional, not permanent. |
I'm not special! I just code my brains out for you! | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #4 on Wed 18 Aug 2004 08:48 PM (UTC) |
Message
| I agree, it has to be an option. |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Nick Gammon
Australia (23,051 posts) Bio
Forum Administrator |
Date
| Reply #5 on Wed 18 Aug 2004 10:05 PM (UTC) |
Message
| A command history that doesn't have duplicates? Sounds like getting a book and reducing its size by eliminating all the duplicated words (eg. the word "the" seems to occur an awful lot, is it really necessary?).
Seriously, I suppose it could be done. You could also write a script that scans the command history and makes a list of unique entries, if that is what you want, for some reason. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| godefroi
(17 posts) Bio
|
Date
| Reply #6 on Thu 19 Aug 2004 11:15 PM (UTC) Amended on Thu 19 Aug 2004 11:16 PM (UTC) by godefroi
|
Message
| For example,
cast a
cast b
cast c
cast a
cast b
cast a
cast b
cast a
cast b
now, if I want to cast c again, I have to go up through b,a,b,a,b,a to c.
If elim dupes were on, I would go through b,a to c.
The logic change is simply to remove all "x" from the command history before adding "x" at the end
The command prompt in windows has the option, as does bash in *nix. Someone thought it was useful. | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #7 on Sun 22 Aug 2004 10:07 AM (UTC) |
Message
| It makes no sense for the command history to have duplicates, because it's there to help you type faster, not provide you with the entire history of what you had typed, I think. Such an option would help you find what you want faster. |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Nick Gammon
Australia (23,051 posts) Bio
Forum Administrator |
Date
| Reply #8 on Tue 24 Aug 2004 10:50 PM (UTC) |
Message
| Added as suggestion #527. |
- 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.
22,696 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top