-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMicrosoft.PowerShell_profile.ps1
32 lines (26 loc) · 1.25 KB
/
Microsoft.PowerShell_profile.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Write-Host -NoNewLine "Initializing profile from "
Write-Host -NoNewLine -ForegroundColor Yellow "$profile"
# ============================================================
(Get-PSProvider 'FileSystem').Home = $ENV:USERPROFILE
# ============================================================
# Alias
# ============================================================
New-Alias Which Get-Command
New-Alias ll Get-ChildItem
New-Alias np "C:\Program Files (x86)\Notepad++\notepad++.exe"
# ============================================================
# Shortcut variables
# ============================================================
$desktop = $(Resolve-Path "$ENV:USERPROFILE\Desktop")
$docs = $(Resolve-Path "$ENV:USERPROFILE\Documents")
$downloads = $(Resolve-Path "$ENV:USERPROFILE\Downloads")
$scripts = "$(Split-Path "$profile")\Scripts"
$modules = "$(Split-Path "$profile")\Modules"
# ============================================================
# Posh-Git (requires https://github.com/dahlbyk/posh-git)
# ============================================================
# Load posh-git example profile
. ($ENV:USERPROFILE + '\posh-git\profile.example.ps1')
Write-Host -NoNewLine " - "
Write-Host -ForegroundColor Green "DONE"
Write-Host