updated README
This commit is contained in:
parent
dbd272eb48
commit
859f16cd08
17
README.md
17
README.md
@ -30,7 +30,7 @@ A pretty shell prompt, written in rust.
|
|||||||
- Order and position
|
- Order and position
|
||||||
- Custom components
|
- Custom components
|
||||||
- Static: Shell icon, Host name, etc.
|
- 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
|
## Current Limitations
|
||||||
|
|
||||||
@ -46,9 +46,8 @@ Ubuntu 24.04
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
**Step 1. Get the binary**
|
**Step 1. Build binary from source**
|
||||||
- Option 1. Download the pre-built binary from the [releases page](https://git.candifloss.cc/candifloss/PrettyPrompt/releases).
|
This requires [rust](https://www.rust-lang.org/tools/install) installed on your system.
|
||||||
- Option 2. Build from source(if you have [rust](https://www.rust-lang.org/tools/install) installed):
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://git.candifloss.cc/candifloss/PrettyPrompt.git
|
git clone https://git.candifloss.cc/candifloss/PrettyPrompt.git
|
||||||
@ -60,7 +59,7 @@ cargo build --release
|
|||||||
**Step 2. Add to `$PATH`**
|
**Step 2. Add to `$PATH`**
|
||||||
- Option 1. Move the binary to a directory in your `$PATH`. Eg:
|
- Option 1. Move the binary to a directory in your `$PATH`. Eg:
|
||||||
```bash
|
```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`
|
- Option 2. Add the directory containing the binary to `$PATH`
|
||||||
System-wide: `/etc/profile`
|
System-wide: `/etc/profile`
|
||||||
@ -72,12 +71,12 @@ export PATH="$PATH:/path/where/the/binary/is/"
|
|||||||
|
|
||||||
## Usage
|
## 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`
|
### `bash`
|
||||||
|
|
||||||
- The `PS1` variable sets a fixed prompt string.
|
- 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`
|
System-wide: `/etc/bash.bashrc`
|
||||||
User-specific: `~/.bashrc`:
|
User-specific: `~/.bashrc`:
|
||||||
@ -101,7 +100,7 @@ Export the `PS1` variable with the output of `prettyprompt $?` as its value.
|
|||||||
User-specific: `~/.zshrc`
|
User-specific: `~/.zshrc`
|
||||||
System-wide: `/etc/zsh/zshrc`
|
System-wide: `/etc/zsh/zshrc`
|
||||||
```sh
|
```sh
|
||||||
export PS1='$(prettyprompt $?)'
|
export PS1='$(prettyprompt $?)' # Notice the single quotes
|
||||||
```
|
```
|
||||||
|
|
||||||
### Other shells
|
### 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`.
|
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
|
## 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.
|
- **Revamped Indicator Symbols:** Enhanced the visual aspect of the prompt.
|
||||||
- **Removed Shell Icon:** Determining the shell is practically not possible.
|
- **Removed Shell Icon:** Determining the shell is practically not possible.
|
||||||
- **Conditional Component Inclusion:** A first step towards user-configuration expected in future versions.
|
- **Conditional Component Inclusion:** A first step towards user-configuration expected in future versions.
|
||||||
|
Loading…
Reference in New Issue
Block a user