-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.ps1
54 lines (39 loc) · 1.36 KB
/
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
### %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Services
## Starship
### Launch on startup
Invoke-Expression (&starship init powershell)
# Autocompletion
## Enable autocomplete
### Shows navigable menu of all options when hitting Tab
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
### Autocompletion for arrow keys
Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
### %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Aliases
## Docker
### `docker-compose` shortcut
Set-Alias dc docker-compose
### Restart the docker compose stack
function DockerComposeRestart {
docker-compose down
docker-compose up -d
}
Set-Alias dcr DockerComposeRestart
### Restart and rebuild the docker compose stack
function DockerComposeRebuildRestart {
docker-compose down
docker-compose up -d --build
}
Set-Alias dcrr DockerComposeRebuildRestart
## Productivity
### Look for a .sln file in the current directory and open it with VS201X
function OpenCurrentDirectorySolution {
Get-ChildItem $Path -Filter "*.sln" |
ForEach-Object {
Write-Output "Opening solution: $($_)"
Start-Process $_
}
}
Set-Alias vs OpenCurrentDirectorySolution