I am not sure if this is specific for my computer. Can some one test it and confirm?
The test is very simple.
1. open command prompt
2. execute few commands
3. check the command history by the command doskey /history
4. clear the history list doskey /reinstall
5. repeat the item 2 (arbitrary commands)
6. check the history doskey /history
On the step 6 the list seems empty. However the previous commands from the step 5 are available by navigation keystrokes and visible by pressing F7.
doskey /history doesn't work properly after doskey reinstall
Moderator: DosItHelp
-
- Posts: 208
- Joined: 26 Dec 2013 09:28
- Contact:
Re: doskey /history doesn't work properly after doskey reins
Can confirm the behavior:
echo a1,b1,c1 are visible with up arrow.
Code: Select all
>echo a
a
>echo b
b
>echo c
c
>doskey /history
cls
echo a
echo b
echo c
doskey /history
>doskey /reinstall
>echo a1
a1
>echo b1
b1
>echo c1
c1
>doskey /history
>
echo a1,b1,c1 are visible with up arrow.
Re: doskey /history doesn't work properly after doskey reins
I previously reported this problem at this topic, where I used the DOSKEY history to achieve a multi-line menu. Accordingly to my tests, doskey /reinstall works the first time only when it is followed by a F7 key, doskey /listsize=# does not works, nor Alt-F7 (to delete the history).
Antonio
Antonio
-
- Posts: 208
- Joined: 26 Dec 2013 09:28
- Contact:
Re: doskey /history doesn't work properly after doskey reins
Aacini, thank you. Probably this is the most robust solution to clear history and keep the functionality:
where the default value 50 can be replaced by another value as requested.
Code: Select all
doskey /listsize=0
doskey /listsize=50
where the default value 50 can be replaced by another value as requested.