From 859f16cd08d996bd52c2ec47b381107816b217de Mon Sep 17 00:00:00 2001 From: candifloss Date: Mon, 2 Dec 2024 09:49:45 +0530 Subject: [PATCH] updated README --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 8100371..4f5c7d0 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ A pretty shell prompt, written in rust. - Order and position - Custom components - Static: Shell icon, Host name, etc. - - Dynamic: Time &date, system stats, or any custom commands + - Dynamic: Time & date, system stats, or any custom commands ## Current Limitations @@ -46,9 +46,8 @@ Ubuntu 24.04 ## Installation -**Step 1. Get the binary** - - Option 1. Download the pre-built binary from the [releases page](https://git.candifloss.cc/candifloss/PrettyPrompt/releases). - - Option 2. Build from source(if you have [rust](https://www.rust-lang.org/tools/install) installed): +**Step 1. Build binary from source** +This requires [rust](https://www.rust-lang.org/tools/install) installed on your system. ```bash git clone https://git.candifloss.cc/candifloss/PrettyPrompt.git @@ -60,7 +59,7 @@ cargo build --release **Step 2. Add to `$PATH`** - Option 1. Move the binary to a directory in your `$PATH`. Eg: ```bash -sudo mv /path/to/prettyprompt /usr/bin/ +sudo mv target/release/prettyprompt /usr/bin/ ``` - Option 2. Add the directory containing the binary to `$PATH` System-wide: `/etc/profile` @@ -72,12 +71,12 @@ export PATH="$PATH:/path/where/the/binary/is/" ## Usage -Configuration varies by shell, and the file location varies by distro. Consult your shell's docs or community resources for details. Note that the exit code of the last command(usually `$?` variable) must be passed as a command-line argument. +Configuration varies by shell, and the file location varies by distro. Refer your shell's docs or community resources for details. Note that the exit code of the last command(usually `$?` variable) must be passed as a command-line argument. ### `bash` - The `PS1` variable sets a fixed prompt string. - - This `PROMPT_COMMAND` variable updates the prompt every time. + - This `PROMPT_COMMAND` variable sets a dynamic prompt. System-wide: `/etc/bash.bashrc` User-specific: `~/.bashrc`: @@ -101,7 +100,7 @@ Export the `PS1` variable with the output of `prettyprompt $?` as its value. User-specific: `~/.zshrc` System-wide: `/etc/zsh/zshrc` ```sh -export PS1='$(prettyprompt $?)' +export PS1='$(prettyprompt $?)' # Notice the single quotes ``` ### Other shells @@ -109,7 +108,7 @@ export PS1='$(prettyprompt $?)' For other shells, refer their docs to set a dynamic prompt. Ensure the last command's exit code (`$?` or equivalent) is passed to `prettyprompt`. ## Changes since the last version - - **Updated Output String Type:** Improved compatibility with other shells. + - **Updated Output String Type:** Ansi strings improved compatibility with other shells. - **Revamped Indicator Symbols:** Enhanced the visual aspect of the prompt. - **Removed Shell Icon:** Determining the shell is practically not possible. - **Conditional Component Inclusion:** A first step towards user-configuration expected in future versions.