Search code examples
windowspowershellcommand-lineconsole

Is it possible to undo a paste on the Windows comandline?


I like to undo my paste on the Windows command line (e.g. PowerShell)

For example:

  1. Type git checkout
  2. Paste the clipboard which has the text test - we have now git checkout test (I use right click paste)
  3. Desired: Undo the paste, so we have again git checkout

Unfortunately pressing esc removes the whole line! (so we have instead of git checkout)


Solution

  • In Powershell you can simply use CTRL + Z but on regular cmd shell it will not work...