Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back a page or two to re-sync the thread and this will then show latest posts. Thanks, Mike.

! command

  • 07-04-2005 3:10pm
    #1
    Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭


    In unix shells, you can call previous commands by using !

    For example, if, say 20 commands ago, I ran "thiscommand thisarg1 thisarg1" and I wanted to run it again with the same set of arguments, I'd just type !th <enter> and blammo, it'll search through the command history and run the first thing that starts with "th".

    Is there a similar feature in the windows cmd.exe? Or can I download one?

    Thanks in advance.


Comments

  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 92,385 Mod ✭✭✭✭Capt'n Midnight


    On dos/win 9x you can load DOSKEY in the autoexec AFAIR it has that

    I usually just use the arrow keys and after 20 lines I'd open notepad and make a batch file.

    BTW: to get TAB to step autocomplete file/folder names in NT / 2K
    REGEDIT4
    
    [HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
    "EnableExtensions"=dword:00000001
    "DefaultColor"=dword:00000000
    "CompletionChar"=dword:00000009
    


  • Registered Users, Registered Users 2 Posts: 23,212 ✭✭✭✭Tom Dunne


    Or you could just go back to your roots and run bash on Windows.


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    Tom: Tried bash on windows through the cygwin package. TBH I thought it was crip. Trying too hard to make windows into unix. Things like C: <enter> would be nice instead of cd /sysdrive/c/ (or whatever it was).

    Capt'n: I have the autocomplete. Nice feature that. Also, I'm running XP, so no doskey, only the up arrow :(

    I use the command prompt a /lot/ in work and just love the ! functionality in unix shells. May write a program myself to do it. Should be handy enough. Will report back if I do get the finger out. :)

    Thanks anyway lads.


  • Registered Users, Registered Users 2 Posts: 4,003 ✭✭✭rsynnott


    CygWin or MinGW are probably your only readily available options.


  • Closed Accounts Posts: 244 ✭✭osmethod


    For example, if, say 20 commands ago, I ran "thiscommand thisarg1 thisarg1" and I wanted to run it again with the same set of arguments, I'd just type !th <enter> and blammo, it'll search through the command history and run the first thing that starts with "th".

    Is there a similar feature in the windows cmd.exe? Or can I download one?

    Open a command line prompt.
    Type doskey
    perform a few commands...
    Press F9 and you can enter a number e.g 3 this will rerun the 3rd command.

    Also, if you run doskey /history after you've loaded doskey and ran some commands it will list all your commands in sequence.

    osmethod


  • Advertisement
Advertisement