In linux I can press ctrl+w to delete a word,how to do it with windows prompt?
|
As squillman said, you'll need another console if you want a specific shortcut to do this, but there are some tricks you can use in command prompt to do this, they just might not be as fast. Pressing F2 you can enter a character in the last command to copy up to for the current command. So if the command only had one x in it for example, by typing an x after pressing F2 it would repeat everything in the previous command up to the first x. You can also use F1 to add a character from the previous command. So for example, you just ran this: dir c:\windows\system32\drivers\etc Now you want to run: dir c:\windows\system32\drivers You can press F2 then enter a v. You can then press F1 3 times to add the letters from the last command. Another trick is to use Ctrl with the arrow keys. You can use Ctrl and left to move to the previous word, then press Insert to turn on overtype mode, and simply overwrite the text. If you want to delete text in front, you can use F4 and it will delete up to the character you enter. for example, you run this command: net start nlsvc now you want to start another service, so press the up arrow key to recall the last command, Ctrl and left to move the cursor before the word | |||
|
feedback
|
|
You can place your cursor at the beginning of a word, hit F4 and enter the letter you want to delete up to. That's about your best bet. Not quite the same, but it'll get you words when you don't have repeated characters. Otherwise you're pretty much stuck looking for an alternative command shell or some kind of aliasing engine that lets you get creative with your commands. | |||
|
feedback
|
|
Press Control-Delete at the beginning of the word to delete it. | |||||
feedback
|