-
Notifications
You must be signed in to change notification settings - Fork 0
/
Microsoft.PowerShell_profile.ps1
54 lines (45 loc) · 1.38 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Set-Alias -Name vim -Value nvim
function vimrc()
{
vim $HOME\dotfiles\nvim\vimrc.vim
}
function nvimrc()
{
vim $HOME\dotfiles\nvim\init.lua
}
function zomboidmodsloc()
{
Write-Output "C:\Program Files (x86)\Steam\steamapps\workshop\content\108600"
}
function cdzomboidmods()
{
$directory = zomboidmodsloc
Set-Location -Path $directory
}
function gpt()
{
param(
[Parameter(ValueFromRemainingArguments=$true)]
$RemainingArgs
)
$concatenatedString = $RemainingArgs -join ' '
npx chatgpt@latest -m gpt-4 "$concatenatedString"
}
# 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"
}
# Better autocomplete
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
Set-Alias ctc ConvertTo-Csv
# install with:
# winget install JanDeDobbeleer.OhMyPosh -s winget
# for some reason its not working
# oh-my-posh.exe init pwsh | Invoke-Expression
Set-PSReadLineOption -EditMode Emacs
. "$PSScriptRoot\Powershell.Local.ps1"