# Pay Respects
Typed a wrong command or don't know what to do? Pay Respects will suggest a fix to your console command by simply pressing `F`!
- đ **Blazing fast suggestion**: You won't notice any delay for asking suggestions!
- âī¸ **Easy to write rules**: You don't need to know Rust. The rules are written in a TOML file!
- đ¯ **Accurate results**: Suggestions are verified before being prompted to the user, no `sudo` suggestions when you are using `doas`!
- đ¤ **AI Support**: AI comes in aid when there is no rule for your error!
- đĒļ **Tiny binary size**: Not even 1MB! Approximately 1MB with all optional features!


## How to Pay Respects
Please follow the instruction for your shell:
Bash / Zsh / Fish
> Manual aliasing:
> ```shell
> alias f="$(pay-respects bash)"
> alias f="$(pay-respects zsh)"
> alias f="$(pay-respects fish)"
> ```
> Auto aliasing (optional custom alias can be added after `--alias`):
> ```shell
> eval "$(pay-respects bash --alias)"
> eval "$(pay-respects zsh --alias)"
> pay-respects fish --alias | source
> ```
Nushell
> Add the following output to your configuration file:
> ```shell
> pay-respects nushell [--alias Custom initialization for arbitrary shell
> pay-respects only requires 2 environment variables to function:
>
> - `_PR_SHELL`: The binary name of the current working shell.
> - `_PR_LAST_COMMAND`: The last command.
>
> pay-respects echos back, if applicable, a `cd` command that can be evaluated by the current working shell.
> General example:
> ```shell
> eval $(_PR_SHELL=sh _PR_LAST_COMMAND="git comit" pay-respects)
> ```
Compile from source (any OS/architecture)
> This installation requires you to have Cargo (the Rust package manager) installed.
> Install from [crates.io](https://crates.io/), features are optional
> ```shell
> cargo install pay-respects --all-features
> ```
> Clone from git and install, suitable for adding custom compile-time rules:
> ```
> git clone --depth 1 https://github.com/iffse/pay-respects
> cd pay-respects
> cargo install --path .
> ```
> Features:
>
> - `runtime-rules`: Read rules in runtime
> - `request-ai`: Request AI for suggestion
> - `libcurl`: Dynamically link `libcurl` for requests, which requires openssl at compile time
> - Only matters to package maintainers, as by turning it off gives fewer headaches when cross-compiling