Created
April 22, 2018 16:27
-
-
Save adbertram/af949da71dd1d774956ed221c4f98c88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Test file | |
Set-Content -Path 'foo.txt' -Value 'This is a test file' | |
## Run any command and pipe to my fictional function | |
Get-Content -Path C:\foo.txt -Raw | Copy-CommandToClipBoard | |
## When pasting from the clipboard, it would look like this | |
Get-Content -Path C:\foo.txt -Raw | |
This is a test file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You mean like this?
Only works for one-line statements