A funny utility to manage your PS1 variable.

PSOne

psone_icon

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:

\[$(tput sgr0)\]" christmas: value: "[\u@\h] 🎅🎄❄️ \[\]" ">
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.

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):

psone add "easter" "[\u@\h] 🐇🥚 \[\]"

Here's the new updated PS1s list:

psone get
\[$(tput sgr0)\]" christmas: value: "[\u@\h] 🎅🎄❄️ \[\]" ">
psones:
  default:
    value: "[\u@\h \W]\$ "
  name: easter:
    value: "[\u@\h] 🐇🥚 \[\]"
  name: halloween:
    value: "[\u@\h] 🎃👻🦇 > \[$(tput sgr0)\]"
  christmas:
    value: "[\u@\h] 🎅🎄❄️ \[\]"

That's it.

For more information, just type: psone help.

Contributions

Of course, contributions are very welcome!

Owner
Alessio Greggi
Computer Scientist graduated at the University of Rome, Tor Vergata. Currently working as Linux Engineer. CTF Player during free time.
Alessio Greggi
Similar Resources

Nintendo 64 ROM utility written in Go.

Nintendo 64 ROM utility written in Go.

Nintendo 64 ROM utility written in Go. Commands ls - List information about all ROMs in a directory info - Show information about a single ROM convert

Dec 7, 2022

Utility functions for work with the Kubernetes Go-Client

go-k8s-utils This repository contains utils for the work with Kubernetes, in specific with the go-client library. Testing This package contains utils

Dec 14, 2022

Scylla-octopus is a backup and maintenance utility for scylladb.

scylla-octopus: a scylladb backup utility Scylla-octopus is a backup and maintenance utility for scylladb. It attempts to reproduce some functionality

Oct 19, 2022

A Go utility to convert Go example tests into jupyter notebooks.

go2colab Scientists (my main project's users) love jupyter notebook tutorials pkg.dev.go's runnable playground doesn't support file IO but I love exam

Jul 10, 2022

Simple utility to get/set the PWM duty cycle and to measure the RPM for a fan connected to the 4-pin header on the CM4IO.

cm4iofan Simple utility to get/set the PWM duty cycle and to measure the RPM for a fan connected to the 4-pin header on the CM4IO. Requirements Enable

Mar 31, 2022

Envoy utility to process envoy config for fast development and debugging.

envoyconf-tools Envoy is a proxy, really awesome and we are devs who often use it, face errors and struggle to debug it, when envoy config's source is

Oct 31, 2021

A utility library to do files/io/bytes processing/parsing in file-system or network.

goreader A utility library to do files/io/bytes processing/parsing in file-system or network. These features are really common to be implemented for a

Nov 1, 2021

Utility to restrict which package is allowed to import another package.

go-import-rules Utility to restrict which package is allowed to import another package. This tool will read import-rules.yaml or import-rules.yml in t

Jan 7, 2022

The utility that created for easily database and their tables rolling up

The utility that created for easily database and their tables rolling up

Nov 6, 2021
Vex is a variable-length, lexicographically-sortable hex format for uint64 values

Vex is a variable-length, lexicographically-sortable hex format for uint64 values. It can be used instead of fmt.Sprintf("%016x", v) for shorter s

Mar 3, 2022
tenv detects environment variable not using t.Setenv
tenv detects environment  variable not using t.Setenv

tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17

Nov 8, 2022
A small utility to extract your Telegram contacts as VCF file.

Telegram to VCF A small utility to extract your Telegram contacts as VCF file. Usage At first build this application or use the precompiled binaries o

Nov 16, 2022
Go package to generate and manage color palettes & schemes 🎨
Go package to generate and manage color palettes & schemes 🎨

Go package to generate and manage color palettes & schemes

Dec 29, 2022
A super simple Lodash like utility library with essential functions that empowers the development in Go
A super simple Lodash like utility library with essential functions that empowers the development in Go

A simple Utility library for Go Go does not provide many essential built in functions when it comes to the data structure such as slice and map. This

Jan 4, 2023
Robust & Easy to use struct mapper and utility methods for Go

go-model Robust & Easy to use model mapper and utility methods for Go struct. Typical methods increase productivity and make Go development more fun ?

Dec 30, 2022
gopkg is a universal utility collection for Go, it complements offerings such as Boost, Better std, Cloud tools.

gopkg is a universal utility collection for Go, it complements offerings such as Boost, Better std, Cloud tools. Table of Contents Introduction

Jan 5, 2023
Utility to add network config file in apk

Utility to add network config file in apk. Which bypass the proxy intercept restriction for user installed burpsuit CA certificate.

Aug 19, 2022
Small utility to allow simpler, quicker testing of parsing files in crowdsec

cs_parser_test Small utility to allow simpler, quicker testing of parsing files in crowdsec Usage $ sudo cs_parser_test -t syslog /var/log/mail.log N

Jul 13, 2021
sigbypass4xx is a utility to automate well-know techniques used to bypass access control restrictions.

sigbypass4xx sigbypass4xx is a utility to automate well-know techniques used to bypass access control restrictions. Resources Usage Installation From

Nov 9, 2022