{"id":212,"date":"2006-08-24T09:12:59","date_gmt":"2006-08-24T14:12:59","guid":{"rendered":"http:\/\/www.wwco.com\/~wls\/blog\/2006\/08\/24\/cmdexe-command-history-pop-up\/"},"modified":"2006-08-24T09:12:59","modified_gmt":"2006-08-24T14:12:59","slug":"cmdexe-command-history-pop-up","status":"publish","type":"post","link":"https:\/\/wls.wwco.com\/blog\/2006\/08\/24\/cmdexe-command-history-pop-up\/","title":{"rendered":"CMD.EXE Command History Pop-Up"},"content":{"rendered":"<p>In Unix&#8217;s bash shell, for instance, there are some nice features for command line completion.  If you type the word  <TT>history<\/TT>  you&#8217;ll get a list of the last commands you executed, preceeded by numbers.  If you type <TT>!<\/TT> immediately followed by that number, it will re-run that command.  If you type <TT>!<\/TT> prefixing the start of some command, it will hunt back through the history and run the first command started with said prefix.<\/p>\n<p>Today while working the XP DOS Box, I bumped a function key and got a pop-up box of my command history.  In all my years working with NT, 2000, and XP, I&#8217;d never seen that before.  So, wanting to recreate it, I researched what it was and how to do it.<\/p>\n<p>The program to thank is DOSKEY.  Pressing F7 while at a command problem brings up the command history menu that surprised me.  If you already know a command&#8217;s number, because you saw it in the list, F9 will let you just enter the number directly.  If you type a letter and press F8, it will cycle through all commands starting with that letter.<\/p>\n<p>Pressing ALT-F7 will clear the command history, which on Unix is the same as typing <TT>history -c<\/TT>.<\/p>\n<p>Unix has a lot more options when it comes to the <TT>history<\/TT> and <TT>fc<\/TT> (fix command) than Windows, but it was nice to see a small subset implemented.  <\/p>\n<p>Just another small trick to add to the productivity bag.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey, did you know F7 brings up a command history in CMD.EXE?  It&#8217;s done that for years, and this was the first I&#8217;d ever run into it.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67,106],"tags":[],"class_list":["post-212","post","type-post","status-publish","format-standard","hentry","category-how-to","category-windows"],"_links":{"self":[{"href":"https:\/\/wls.wwco.com\/blog\/wp-json\/wp\/v2\/posts\/212","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wls.wwco.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wls.wwco.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wls.wwco.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wls.wwco.com\/blog\/wp-json\/wp\/v2\/comments?post=212"}],"version-history":[{"count":0,"href":"https:\/\/wls.wwco.com\/blog\/wp-json\/wp\/v2\/posts\/212\/revisions"}],"wp:attachment":[{"href":"https:\/\/wls.wwco.com\/blog\/wp-json\/wp\/v2\/media?parent=212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wls.wwco.com\/blog\/wp-json\/wp\/v2\/categories?post=212"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wls.wwco.com\/blog\/wp-json\/wp\/v2\/tags?post=212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}