Skip to content

Instantly share code, notes, and snippets.

@Marin-Kitagawa
Last active September 19, 2021 20:52
Show Gist options
  • Save Marin-Kitagawa/cc5dac8bb16bc25c07ea1ba4098b9d45 to your computer and use it in GitHub Desktop.
Save Marin-Kitagawa/cc5dac8bb16bc25c07ea1ba4098b9d45 to your computer and use it in GitHub Desktop.
Powershell (`pwsh`) profile
Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme jandedobbeleer
Import-Module -Name Terminal-Icons
function mcd($a) {
md $a && cd $a
}
function rmrf($a) {
rm -Recurse -Force $a
}
# Dracula readline configuration. Requires version 2.0, if you have 1.2 convert to `Set-PSReadlineOption -TokenType`
Set-PSReadlineOption -Color @{
"Command" = [ConsoleColor]::Green
"Parameter" = [ConsoleColor]::Gray
"Operator" = [ConsoleColor]::Magenta
"Variable" = [ConsoleColor]::White
"String" = [ConsoleColor]::Yellow
"Number" = [ConsoleColor]::Blue
"Type" = [ConsoleColor]::Cyan
"Comment" = [ConsoleColor]::DarkCyan
}
# Dracula Prompt Configuration
Import-Module posh-git
$GitPromptSettings.DefaultPromptPrefix.Text = "$([char]0x2192) " # arrow unicode symbol
$GitPromptSettings.DefaultPromptPrefix.ForegroundColor = [ConsoleColor]::Green
$GitPromptSettings.DefaultPromptPath.ForegroundColor =[ConsoleColor]::Cyan
$GitPromptSettings.DefaultPromptSuffix.Text = "$([char]0x203A) " # chevron unicode symbol
$GitPromptSettings.DefaultPromptSuffix.ForegroundColor = [ConsoleColor]::Magenta
# Dracula Git Status Configuration
$GitPromptSettings.BeforeStatus.ForegroundColor = [ConsoleColor]::Blue
$GitPromptSettings.BranchColor.ForegroundColor = [ConsoleColor]::Blue
$GitPromptSettings.AfterStatus.ForegroundColor = [ConsoleColor]::Blue
function sccwd() {
pwd | Set-Clipboard
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment