Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/electricduck/hello
๐ A colourful welcome mat for PowerShell
https://github.com/electricduck/hello
powershell
Last synced: 25 days ago
JSON representation
๐ A colourful welcome mat for PowerShell
- Host: GitHub
- URL: https://github.com/electricduck/hello
- Owner: electricduck
- License: mit
- Created: 2020-10-01T02:53:53.000Z (about 4 years ago)
- Default Branch: develop
- Last Pushed: 2020-11-09T16:23:41.000Z (almost 4 years ago)
- Last Synced: 2023-02-26T04:47:00.499Z (over 1 year ago)
- Topics: powershell
- Language: PowerShell
- Homepage:
- Size: 294 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Hello
A colourful welcome mat for PowerShell
## Using Hello
### Installing
```
Invoke-WebRequest 'https://raw.githubusercontent.com/electricduck/hello/develop/Install-Hello.ps1' -OutFile Install-Hello.ps1; ./Install-Hello.ps1; Remove-Item Install-Hello.ps1
```Using PowerShell 5.1 **or** [Powershell Core 6.0+](https://github.com/powershell/powershell), issue the above command, and then restart your shell. Easy, right?
### Updating
Updating Hello to the latest release can be done by issuing the below command. This will automatically download the latest stable release and install it; restart your shell to use.
```
~ โ Update-Hello
```Updating Hello to the latest **development release** can be done by setting the `-Dev` parameter to `$true`. However, if something breaks and Hello no longer works, there is no way to revert this: you will need to destroy `hello.ps1` and install a fresh copy.
### Configuring
Basic customization is possible by setting environment variables in `$PROFILE`.
```
~ โ notepad $PROFILE # or another editor besides notepad
```This is your PowerShell profile that is read on startup. If you've never touched this file before, you'll find just the statement telling PowerShell to "source" Hello.
```
. /home/you/.config/powershell/hello.ps1
```Configuration variables **must** be added above the above line. Other PowerShell statements can also be added here.
```
$env:HELLO_Caret = "๐" # Change Hello's prompt from โ to a ๐
$env:HELLO_ColorAccent = "Red" # Change Hello's logo and caret from cyan to red# Some other stuff
Set-Alias -Name cl -Value Clear-Host -Option AllScope # Create an alias for Clear-Host as "cl". /home/you/.config/powershell/hello.ps1
```To test, configuration variables can also be temporarily set via the shell.
```
~ โ $env:HELLO_Caret = "๐" # Temporarily set an environment variable
~ โ pwsh # Spawn a child process (use 'powershell' for 5.1)
```#### Environment Variables
*All below variables start with `$env:HELLO_`.*
| **Variable** | **Type** | **Description** | **Default** |
| -------------------- | -------- | ---------------------------------------------------------------------------------- | ----------- |
| **AllowUnsupported** | Boolยน | _Allow installing/updating on unsupported PowerShell versions_ | `$false` |
| **Caret** | String | _Prompt character_ | `"โ"`ยฒ |
| **ColorAccent** | String | _Accent color, used by:_
ย โข _ASCII PowerShell logo_
ย โข _Caret_ | `"Cyan"` |
| **ColorHigh** | String | _High color_ | `"White"` |
| **ColorLow** | String | _Low color_ | `"Gray"` |
| **MotdVisible** | Boolยน | _Show the welcome message on startup (or `Restart-Shell`)_ | `$true` |### Remarks
- **ยน** _In PowerShell, bools are expressed as `$true` or `$false`_
- **ยฒ** _If Unicode support is off, this will use `">"` by default_