Skip to content

Commit 3fdb748

Browse files
committed
feat: add git-crypt custom functions and aliases to match WSL
1 parent 17e8561 commit 3fdb748

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Profile/aliases.ps1

+7
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ If (Get-Command gcalcli -ErrorAction SilentlyContinue) {
5151
Set-Alias -Name caladd -Value New-CalendarEvent
5252
}
5353

54+
# git-crypt
55+
If (Get-Command git-crypt -ErrorAction SilentlyContinue) {
56+
Set-Alias -Name gcrypts -Value Get-GitCryptStatus
57+
Set-Alias -Name gcrypt -Value git-crypt
58+
Set-Alias -Name gcryptf Invoke-GitCryptStatus
59+
}
60+
5461
# If using code-insiders
5562
If (Get-Command code-insiders -ErrorAction SilentlyContinue) {
5663
Set-Alias -Name codee -Value code-insiders

Profile/functions.ps1

+8
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,14 @@ Function Get-MySecret($name) {
181181
Get-Secret -Name $name -AsPlainText
182182
}
183183

184+
Function Get-GitCryptStatus {
185+
git-crypt status -e
186+
}
187+
188+
Function Invoke-GitCryptStatus {
189+
git-crypt status -f
190+
}
191+
184192
# ------------------
185193
# Remoting
186194
# ------------------

0 commit comments

Comments
 (0)