Skip to content

Instantly share code, notes, and snippets.

@Halkcyon
Created August 2, 2019 14:38
Show Gist options
  • Select an option

  • Save Halkcyon/46b44a18f8c29a99f2d08843958361e4 to your computer and use it in GitHub Desktop.

Select an option

Save Halkcyon/46b44a18f8c29a99f2d08843958361e4 to your computer and use it in GitHub Desktop.

Revisions

  1. Halkcyon created this gist Aug 2, 2019.
    11 changes: 11 additions & 0 deletions prompt.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    function prompt {
    @"
    `e[38;2;148;152;0m`n{0}
    `e[m/{1}/
    `e[38;5;21mPS `e[m`e[1m`e[4m {2} `e[m `e[38;5;208m{3}`e[38;5;92m{4} `e[m
    "@ -f @((Get-Date -UFormat '%Y-%m-%d %H:%M:%S')
    $PWD.Drive.Name.ToUpper()
    ((Get-History).Count + 1).ToString('000')
    ($PWD.ProviderPath.ToLower().Replace($HOME, '~').Replace('\', '/') -replace '\w:' -replace '/$') + '/'
    '>' * ($NestedPromptLevel + 1))
    }