Skip to content

🌈 Port of Derek Taylor's Popular "shell-color-scripts" for PowerShell

License

Notifications You must be signed in to change notification settings

scottmckendry/ps-color-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌈 PowerShell Color Scripts

An almost like for like port of Derek Taylor's Popular shell-color-scripts package for PowerShell.

Painstakingly ported to PowerShell from the original Bash scripts, this module provides a collection of color scripts to brighten up your PowerShell terminal.

demo

πŸ“¦ Installation

The module is available on the PowerShell Gallery and can be installed using the following command.

Install-Module -Name ps-color-scripts -Scope CurrentUser

πŸš€ Usage

Default: Display a random color script.

Show-ColorScript

Specific: Display a specific color script.

Show-ColorScript -Name "pacman"

List: List all available color scripts.

Show-ColorScript -List

πŸ§‘β€πŸ³ Recipes

Add to your PowerShell profile to display a random color script on startup.

image

$profilePath = $PROFILE.CurrentUserAllHosts
$profileExists = Test-Path -Path $profilePath

if (!$profileExists) {
    New-Item -Path $PROFILE.CurrentUserAllHosts -ItemType File
}

Add-Content -Path $profilePath -Value "Show-ColorScript"

Tip

Replace Show-ColorScript with Show-ColorScript -Name "[name]" to display a specific color script, replacing [name] with the name of the color script you wish to display.

Add an alias for Show-ColorScript to your PowerShell profile.

Quickly display a random color script by typing scs into your PowerShell terminal.

$profilePath = $PROFILE.CurrentUserAllHosts
$profileExists = Test-Path -Path $profilePath

if (!$profileExists) {
    New-Item -Path $PROFILE.CurrentUserAllHosts -ItemType File
}

Add-Content -Path $profilePath -Value "New-Alias -Name scs -Value Show-ColorScript"

Tip

Replace scs with your preferred alias. You can also run scs [name] to display a specific color script, replacing [name] with the name of the color script you wish to display.

🀝 Contributing

Contributions, issues and feature requests are welcome! Try to keep contributions in the spirit of the original shell-color-scripts project. New scripts should use ANSI escape codes to colorize the output, ideally using 10 to 16 of the available colors (see ANSI escape code for more information).

πŸ“ License

Like its inspiration, this project is licensed under the MIT License. Feel free to use the code as you see fit.

About

🌈 Port of Derek Taylor's Popular "shell-color-scripts" for PowerShell

Topics

Resources

License

Stars

Watchers

Forks