Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

caprompt

Simple shell prompt formatter. See below for scripts to customize prompt:

Unix Shells (Bash / Zsh)

Add the following to your profile script (e.g. .bashrc)

PS1="$(caprompt $?)"

Powershell

Add this to the Profile script (found from $Profile in the terminal)

function prompt {
    $previousEncoding = [Console]::OutputEncoding
    [Console]::OutputEncoding = [Text.Encoding]::UTF8

    $output = Invoke-Expression "caprompt $?"
    Set-PSReadLineOption -ExtraPromptLineCount (($output | Measure-Object -Line).Lines - 1)
    $output -join "`n"

    [Console]::OutputEncoding = $previousEncoding
}

About

Simple shell prompt formatter

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages