https://github.com/alegrey91/psone
A funny utility to manage your PS1 variable.
https://github.com/alegrey91/psone
bash golang linux
Last synced: about 2 months ago
JSON representation
A funny utility to manage your PS1 variable.
- Host: GitHub
- URL: https://github.com/alegrey91/psone
- Owner: alegrey91
- License: apache-2.0
- Created: 2021-10-19T21:27:02.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-12T17:37:09.000Z (over 4 years ago)
- Last Synced: 2025-03-04T16:37:55.430Z (over 1 year ago)
- Topics: bash, golang, linux
- Language: Go
- Homepage:
- Size: 4.65 MB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PSOne

## Introduction
Are you a **Veteran Unix Admin**? If so, you probably know the charm of the `PS1` environment variable.
For a deep focus I suggest you to take a look at this: https://en.wikipedia.org/wiki/Command-line_interface#Command_prompt.
## Why
The main reason why I decided to implement this utility is my fetishism for `PS1`. I like to customize this and change it for the right occasion, like to wear an elegant dress for your birthday 😄.
## How
The `psone` utility help you to manage different `PS1` storing them to a config file (`~/.psone.yaml`).
Whenever you want, you can **add**, **remove**, **set**, or **get** them. Once you set your favourite `PS1`, to apply your modification, just `source ~/.bashrc`.
## Examples
Fist of all, you need to generate your own `~/.psone.yaml` file. Here's an example of it:
```yaml
psones:
default:
value: "[\\u@\\h \\W]\\$ "
halloween:
value: "[\\u@\\h] 🎃👻🦇 > \\[$(tput sgr0)\\]"
christmas:
value: "[\\u@\\h] 🎅🎄❄️ \\[\\]"
```
Once you got your config file, you are ready to set your custom `PS1`.
```bash
psone set halloween && source ~/.bashrc
```
This is going to be your result: `[user@laptop] 🎃👻🦇 > `.
Then, if you want to add a new one (the easter one):
```bash
psone add "easter" "[\\u@\\h] 🐇🥚 \\[\\]"
```
Here's the new updated `PS1`s list:
```bash
psone get
```
```yaml
psones:
default:
value: "[\u@\h \W]\$ "
easter:
value: "[\u@\h] 🐇🥚 \[\]"
halloween:
value: "[\u@\h] 🎃👻🦇 > \[$(tput sgr0)\]"
christmas:
value: "[\u@\h] 🎅🎄❄️ \[\]"
```
That's it.
For more information, just type: `psone help`.
## Installation
Just type the following command:
```bash
make
```
or alternatively download the latest release from here: https://github.com/alegrey91/psone/releases
## Contributions
Of course, contributions are very welcome!