Skip to main content

What are the basic line editing tricks and shortcuts for Windows PowerShell

In our blog, we’ve been discussing about the PowerShell console of the Windows 7. Today, we have come out with a different tip about the PowerShell console. The tips is about editing the capabilities of the current line. Moreover, you can enter get-history in order to list all the commands in the Command History or you can enter the Clear-history in order to clear the Command History.
The Get-history is able to list the commands by command number and let you pass this to Invoke-History for running a specific numbered command from the Command History. For example, this would run command 35:
invoke-history 35

The Windows PowerShell supports the following useful line editing commands.

` [Backward apostrophe key] Press the backward apostrophe key to insert a line break or as an escape character to make a literal character. You can also break a line at the pipe (|) character.

Alt+Space+E Displays an editing shortcut menu with Mark, Copy, Paste, Select All, Scroll, and Find options. You can then press K for Mark, Y for Copy, P for Paste, S for Select All, L to scroll through the screen buffer, or F to search for text in the screen buffer. To copy the screen buffer to the Clipboard, press Alt+Space+E+S and then press Alt+Space+E+Y.

Alt+F7 Clears the command history.

Ctrl+C Press Ctrl+C to break out of the subprompt or terminate execution.

Ctrl+End Press Ctrl+End to delete all the characters in the line after the cursor.

Ctrl+Left arrow / Ctrl+Right arrow Press Ctrl+Left arrow or Ctrl+Right arrow to move left or right one word at a time.

Ctrl+S Press Ctrl+S to pause or resume the display of output.

Delete / Backspace Press Delete to delete the character under the cursor, or press the Backspace key to delete the character to the left of the cursor.

Esc Press the Esc key to clear the current line.

F1 Moves the cursor one character to the right on the command line. At the end of the line, inserts one character from the text of your last command.

F2 Creates a new command line by copying your last command line up to the character you type.

F3 Completes the command line with the content from your last command line, starting from the current cursor position to the end of the line.

F4 Deletes characters from your current command line, starting from the current cursor position up to the character you type.

F5 Scans backward through your command history.

F7 Displays a pop-up window with your command history and allows you to select a command. Use the arrow keys to scroll through the list. Press Enter to select a command to run, or press the Right arrow key to place the text on the command line.

F8 Uses text you’ve entered to scan backward through your command history for commands that match the text you’ve typed so far on the command line.

F9 Runs a specific numbered command from your command history. Command numbers are listed when you press F7.

Up / Down arrow keys Press the Up or Down arrow key to scan forward or backward through your command history.

Right-click If QuickEdit is disabled, displays an editing shortcut menu with Mark, Copy, Paste, Select All, Scroll, and Find options. To copy the screen buffer to the Clipboard, right-click, choose Select, and then press Enter.

Tab / Shift+Tab Press the Tab key or press Shift+Tab to access the tab expansion function.
Page Up / Page Down Press the Page Up or Page Down key to access the first or last command in the command history.
Left / Right arrow keys Press the Left or Right arrow key to move the cursor left or right on the current line.
Home / End Press Home or End to move to the beginning or end of the line.
Insert Press Insert to switch between insert mode and overwrite mode.
By

Popular posts from this blog

New Micro battery, power packed for high performance

For a size of a few millimetres, the new micro-batteries are powerful enough to jump start a car battery and then quickly charge the cell phone. Researchers from the University of Illinois have developed the micro batteries which can be used to drive compact electronic devices and new applications for radio communications. The micro batteries are so good that they can even out power the super capacitors. The results were published in ‘Nature Communications’ in the April 16 issue. The micro batteries have energy and power and with the researchers tweaking the structure of the micro batteries a little bit, its use can be for wide range applications.

The high performance of the micro battery is based on its 3-dimensional micro-structure. Based on the design of fast charging cathode by Professor Paul Braun’s group, researchers developed the matching anode and integrated it with the fast charging cathode at a micro-scale and made a complete battery with high performance. These batteries cou…

HTC Touch Diamond SmartPhone!

The phones design is an innovative in which the user has the geometric form language to make sure a clutter-free environment for screening content. The San Francisco based studio One & Co collaborated with HTC Taiwan Design team to create Diamond HTC smartphone.







The HTC phone is quite wonderful with design and the rapid development in the smartphone market the HTC has taken innovative steps to capture the SmartPhone market HTC develops these kind of new inventive designs.
Inspired

How to Automatically Convert any RSS Feed to an iPhone Web app!

For iPhone users this is another web app which converts any well formed XML RSS feed to an iPhone version. It is possible because it is worked with the typical sliding style interface to suit the iPhone optimized version. For instance if you had the iPhone right now here is the Google News Feed




Jim Liddle, one of the creators of the service, told iPhone Atlas “You can book mark the generated site and use it to host your own content and reference it from your own. It seems that these feed on your iPhone is quiet usable.