psone

command module
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

README ΒΆ

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:

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

make

Contributions

Of course, contributions are very welcome!

Documentation ΒΆ

Overview ΒΆ

Copyright Β© 2021 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories ΒΆ

Path Synopsis
lib

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL