Skip to content

Instantly share code, notes, and snippets.

@TomasBouda
Created November 5, 2020 21:32
Show Gist options
  • Save TomasBouda/81e63c887eafee8169366da50406dc1c to your computer and use it in GitHub Desktop.
Save TomasBouda/81e63c887eafee8169366da50406dc1c to your computer and use it in GitHub Desktop.
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