-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathprofile.ps1
More file actions
62 lines (46 loc) · 1.89 KB
/
profile.ps1
File metadata and controls
62 lines (46 loc) · 1.89 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# MODULES
Import-Module PSReadLine
Import-Module PSFzf
# SSH
ssh-agent
# ssh-add
# PROMPT
function prompt
{
Write-Host ("[" + $(get-date -Format "HH:mm:ss") + "] ") -nonewline -foregroundcolor Cyan
Write-Host ($PWD) -nonewline -foregroundcolor Yellow
return " \> "
}
# ALIASES
Set-Alias -Name l -Value Get-ChildItem
Set-PsFzfOption -PSReadlineChordReverseHistory 'Ctrl+r'
# INPUT
# Up and Downs, we don't like arrow keys here
Set-PSReadLineKeyHandler -Key ctrl+p -Function PreviousHistory
Set-PSReadLineKeyHandler -Key ctrl+n -Function NextHistory
Set-PSReadLineKeyHandler -Key ctrl+j -Function HistorySearchForward
Set-PSReadLineKeyHandler -Key ctrl+k -Function HistorySearchBackward
# Editing
Set-PSReadlineKeyHandler -Key ctrl+w -Function BackwardKillWord
Set-PSReadlineKeyHandler -Key ctrl+u -Function BackwardKillLine
# Set-PSReadlineKeyHandler -Key ctrl+k -Function KillLine
Set-PSReadlineKeyHandler -Key alt+d -Function KillWord
Set-PSReadlineKeyHandler -Key alt+b -Function BackwardWord
Set-PSReadlineKeyHandler -Key alt+f -Function NextWord
Set-PSReadlineKeyHandler -Key ctrl+e -Function EndOfLine
Set-PSReadlineKeyHandler -Key ctrl+a -Function BeginningOfLine
Set-PSReadlineKeyHandler -Key ctrl+f -Function CharacterSearch
Set-PSReadlineKeyHandler -Key ctrl+F -Function CharacterSearchBackward
# Management Stuff
# Set-PSReadlineKeyHandler -Key ctrl+alt+h -Function
# Set-PSReadlineKeyHandler -Key ctrl+w -Function c
# Scrolling Handled by wt.exe
# Set-PSReadLineKeyHandler -Key ctrl+u -Function ScrollDisplayUp
# Set-PSReadLineKeyHandler -Key ctrl+d -Function ScrollDisplayDown
# Set-PSReadLineKeyHandler -Key ctrl+y -Function ScrollDisplayDownLine
# Set-PSReadLineKeyHandler -Key ctrl+e -Function ScrollDisplayUpLine
# Chocolatey profile
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}