-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMicrosoft.PowerShell_profile.ps1
More file actions
61 lines (51 loc) · 2.88 KB
/
Microsoft.PowerShell_profile.ps1
File metadata and controls
61 lines (51 loc) · 2.88 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
Import-Module PSReadLine
Import-Module PSFzf
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadlineKeyHandler -Key "Tab" -ScriptBlock { Invoke-FzfTabCompletion }
# Set-PSReadlineKeyHandler -Key "Tab" -Function Complete
Set-PSReadlineOption -BellStyle None
# Override PSReadLine's history search
Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' `
-PSReadlineChordReverseHistory 'Ctrl+r'
Import-Module Get-ChildItemColor
Set-Alias -Name ls -Value Get-ChildItemColorFormatWide
Set-Alias -Name ll -Value Get-ChildItemColor
Import-WslCommand "awk", "find", "grep", "head", "less", "man", "sed", "seq", "ssh", "sudo", "tail", "xdotool"
$WslDefaultParameterValues = @{}
$WslDefaultParameterValues["grep"] = "-E"
$WslDefaultParameterValues["less"] = "-i"
$WslDefaultParameterValues["ls"] = "-hl --group-directories-first --color=always"
$WslEnvironmentVariables = @{}
Function goLeviathan {ssh dmsussma@leviathan.physics.emory.edu}
Function goNCSA {ssh dsussman@login.delta.ncsa.illinois.edu}
Function goBehemoth {ssh sussman@behemoth.physics.emory.edu}
Set-Alias -Name lev -Value goLeviathan
Set-Alias -Name ncsa -Value goNCSA
Set-Alias -Name behemoth -Value goBehemoth
function juliaImage {
julia --sysimage=C:\Users\dmsussm\OMR-sysimage.so
}
Set-Alias jul juliaImage
function prompt {
$p = $executionContext.SessionState.Path.CurrentLocation
$osc7 = ""
if ($p.Provider.Name -eq "FileSystem") {
$ansi_escape = [char]27
$provider_path = $p.ProviderPath -Replace "\\", "/"
$osc7 = "$ansi_escape]7;file://${env:COMPUTERNAME}/${provider_path}${ansi_escape}\"
}
"${osc7}PS $p$('>' * ($nestedPromptLevel + 1)) ";
}
# Import the Chocolatey Profile that contains the necessary code to enable
# tab-completions to function for `choco`.
# Be aware that if you are missing these lines from your profile, tab completion
# for `choco` will not function.
# See https://ch0.co/tab-completion for details.
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
oh-my-posh init pwsh --config 'C:\Users\dmsussm\AppData\Local\Programs\oh-my-posh\themes\peru.omp.json' | Invoke-Expression
#oh-my-posh init pwsh --config 'C:\Users\dmsussm\AppData\Local\Programs\oh-my-posh\themes\nordtron.omp.json' | Invoke-Expression
$WslEnvironmentVariables["LS_COLORS"]= "di=1;38;2;143;188;187:or=1;38;2;236;239;244;48;2;191;97;106:ln=1;38;2;163;190;140:ca=0:su=0:mi=1;38;2;236;239;244;48;2;191;97;106:ex=1;38;2;208;135;112:do=1;38;2;180;142;173;48;2;67;76;94:fi=0;38;2;76;86;106:so=1;38;2;180;142;173;48;2;67;76;94:ow=0:st=0:*~=0;38;2;67;76;94:pi=1;38;2;235;203;139;48;2;67;76;94:rs=0;38;2;76;86;106:mh=0:sg=0:cd=1;38;2;235;203;139;48;2;67;76;94:bd=1;38;2;235;203;139;48;2;67;76;94:no=0;38;2;76;86;106:tw=0"