Crates.io | pay-respects |
lib.rs | pay-respects |
version | 0.7.9 |
created_at | 2024-09-18 14:09:05.343306+00 |
updated_at | 2025-08-26 16:50:35.493889+00 |
description | Command suggestions, command-not-found and thefuck replacement written in Rust |
homepage | https://codeberg.org/iff/pay-respects |
repository | https://github.com/iffse/pay-respects |
max_upload_size | |
id | 1379326 |
size | 114,466 |
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
!
sudo
suggestions when you are using doas
!Please follow the instruction for your shell:
Append the following line to your configuration file (
--alias
no longer required for v0.7+):eval "$(pay-respects bash --alias)" eval "$(pay-respects zsh --alias)" pay-respects fish --alias | source
Arguments:
--alias [alias]
: Alias to a custom key, defaults tof
--nocnf
: Disablescommand_not_found
handler
Manual aliasing (REMOVED after v0.7):
alias f="$(pay-respects bash)" alias f="$(pay-respects zsh)" alias f="$(pay-respects fish)"
Add the following output to your configuration file:
pay-respects nushell --alias [<alias>]
Or save it as a file:
pay-respects nushell --alias [<alias>] | save -f ~/.pay-respects.nu
and source from your config file:
source ~/.pay-respects.nu
Append the following output to your profile:
pay-respects pwsh --alias [<alias>]
Or directly pipe the output to your profile:
pay-respects pwsh --alias [<alias>] >> $PROFILE
pay-respects only requires 2 environment variables to function:
_PR_SHELL
: The binary name of the current working shell_PR_LAST_COMMAND
: The last commandpay-respects echos back, if applicable, a
cd
command that can be evaluated by the current working shell.
General example:
eval $(_PR_SHELL=sh _PR_LAST_COMMAND="git comit" pay-respects)
Following variables are not required, but can be used to reduce unnecessary operations:
_PR_ALIAS
: A list of aliases to commands. Separated by newlines with zsh-like formatting, e.g.gc=git commit
_PR_ERROR_MSG
: Error message from the previous command.pay-respects
will rerun previous command to get the error message if absent_PR_EXECUTABLES
: A space separated list of commands/executables.pay-respects
will search for$PATH
if absent
_PR_LIB
: Directory of modules, analogous toPATH
. If not provided, search inPATH
or compile-time provided value_PR_PACKAGE_MANAGER
: Use defined package manager instead of auto-detecting alphabetically. Empty value disables package search functionality
_DEF_PR_PACKAGE_MANAGER
: compile-time value
You can specify different modes to run with
_PR_MODE
:
noconfirm
: Execute suggestions without confirmecho
: Print suggestions tostdout
without executingcnf
: Used for command not found hookExample usage with
noconfirm
:function ff() { ( export _PR_MODE="noconfirm" f ) }
You can now Press F
to Pay Respects!
Install from your package manager if available:
OS / Distribution Repository Instructions Arch Linux AUR paru -S pay-respects
(-bin
)Arch Linux (ARM) Arch Linux CN sudo pacman -S pay-respects
MacOS / Any timescam brew install timescam/homebrew-tap/pay-respects
NixOS / Any nixpkgs nix-env -iA nixos.pay-respects
Alternatively, install pre-built binaries from GitHub releases. An install script is available:
curl -sSfL https://raw.githubusercontent.com/iffse/pay-respects/main/install.sh | sh
This installation requires you to have Cargo (the Rust package manager) installed.
Install from crates.io, modules are optional
cargo install pay-respects cargo install pay-respects-module-runtime-rules cargo install pay-respects-module-request-ai
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 core cargo install --path module-runtime-rules cargo install --path module-request-ai
See configuration.
See the following pages:
Disclaimer: You are using AI generated content on your own risk. Please double-check its suggestions before accepting.
AI suggestions should work out of the box with request-ai
module installed.
An API key is included with the source (your distribution might have stripped them out). It should always work unless I can no longer afford this public service or rate limits are reached. If it's useful to you, consider making a donation:
AI usages and API configurations
Current option to write rules should cover most of the cases. We need more rules, contributions are welcomed!
There's also a roadmap for contribution opportunities.
This project is hosted at various sites, you can choose the one that you feel most comfortable with: