Skip to content

Instantly share code, notes, and snippets.

@TomasBouda
Created November 5, 2020 21:33
Show Gist options
  • Save TomasBouda/06db876bbeff4554d10f520c1264c5a7 to your computer and use it in GitHub Desktop.
Save TomasBouda/06db876bbeff4554d10f520c1264c5a7 to your computer and use it in GitHub Desktop.
# Setup git addons
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
# Ensure that Get-ChildItemColor is loaded
Import-Module Get-ChildItemColor
# Set l and ls alias to use the new Get-ChildItemColor cmdlets
Set-Alias ls Get-ChildItemColor -Option AllScope
Set-Alias l Get-ChildItemColorFormatWide -Option AllScope
# 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"
}
# Chocolatey profile
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment