Last active
December 20, 2022 01:35
-
-
Save fcoclavero/b507b55f70f05bbd39de3059e8598b29 to your computer and use it in GitHub Desktop.
Powershell cheatsheet
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
# Rename files recursively | |
Get-ChildItem -File -Recurse | % { Rename-Item -Path $_.PSPath -NewName $_.Name.replace(".pth",".pt")} | |
# Copy to clipboard | |
cat file.txt | clip Sort | |
# fish-like autosuggestions | |
Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck | |
# The next can be set in the PoSH profile: `notepad $profile` | |
Import-Module PSReadLine | |
Set-PSReadLineOption -PredictionSource History |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment