Last active
September 26, 2016 01:36
-
-
Save K4zuki/68141c74462817f6dd0e to your computer and use it in GitHub Desktop.
PowerShell profile
This file contains hidden or 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
## from http://www.hanselman.com/blog/TowardsABetterConsolePSReadLineForPowerShellCommandLineEditing.aspx | |
(new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex | |
install-module PsReadLine | |
$ps = ${env:USERPROFILE}+"/Documents/WindowsPowerShell" | |
if (-Not (Test-Path $ps)) { | |
mkdir $ps | |
} | |
$p = ${env:USERPROFILE}+"\git_profile\profile.ps1" | |
$file= "if (Test-Path $p) | |
{ | |
. $p | |
} | |
" | |
$file | Out-File ${ps}/profile.ps1 -encoding OEM | |
#$file | Out-File ./_profile.ps1 |
This file contains hidden or 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
$Host.UI.RawUI.BackgroundColor = ($bckgrnd = 'Black') | |
$Host.UI.RawUI.ForegroundColor = 'White' | |
Clear-Host | |
Remove-Item alias:ls | |
Remove-Item alias:cat | |
Remove-Item alias:clear | |
Remove-Item alias:cp | |
Remove-Item alias:echo | |
Remove-Item alias:history | |
Remove-Item alias:pwd | |
Remove-Item alias:rm | |
Remove-Item alias:rmdir | |
remove-item alias:diff -force | |
Import-Module PSReadline | |
## from http://stackoverflow.com/questions/8360215/use-ctrl-d-to-exit-and-ctrl-l-to-cls-in-powershell-console | |
Set-PSReadlineKeyHandler -Key Ctrl+d -Function DeleteCharOrExit | |
set HOME=C:\Users\USERNAME | |
$env:Path += "C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment