Created
November 5, 2020 21:32
-
-
Save TomasBouda/81e63c887eafee8169366da50406dc1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module posh-git | |
Import-Module oh-my-posh | |
Set-Theme Paradox | |
# Helper function to change directory to my git workspace | |
function mygit { Set-Location "C:\Data\GIT" } | |
function tcmd { | |
param( | |
[Parameter(Mandatory = $false, Position = 0)] | |
[string]$FolderPath = $PWD, | |
[Parameter(Mandatory = $false, Position = 1)] | |
[Alias('r')] | |
[switch]$RightPane | |
) | |
if($RightPane){ | |
$pane = "R" | |
} | |
else{ | |
$pane = "L" | |
} | |
& "C:\totalcmd\TOTALCMD64.EXE" /O /T /$pane="$FolderPath" | |
} | |
Invoke-Expression (& { | |
$hook = if ($PSVersionTable.PSVersion.Major -lt 6) { 'prompt' } else { 'pwd' } | |
(zoxide init --hook $hook powershell) -join "`n" | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment