chore: prepare for release

This commit is contained in:
iff 2025-04-05 19:25:37 +02:00
parent 5f521650c8
commit 3b75364e86
4 changed files with 39 additions and 7 deletions

View file

@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Breaking
- Manual aliasing no longer supported
### Added
- `noconfirm` mode: Run suggestions without confirmation
- Suggestion tests
### Fixed
- PowerShell's initialization for versions that does not support `Get-Error`
### Changed
- Reimplemented initialization with templates
## [0.6.14] - 2025-03-13
### Added

View file

@ -18,7 +18,7 @@ Please follow the instruction for your shell:
<details>
<summary>Bash / Zsh / Fish</summary>
> Append the following line to your configuration file:
> Append the following line to your configuration file (`--alias` no longer required for v0.7+):
> ```sh
> eval "$(pay-respects bash --alias)"
> eval "$(pay-respects zsh --alias)"
@ -28,7 +28,7 @@ Please follow the instruction for your shell:
> - `--alias [alias]`: Alias to a custom key, defaults to `f`
> - `--nocnf`: Disables `command_not_found` handler
> Manual aliasing (**DEPRECATED**, do not use):
> Manual aliasing (**REMOVED** after v0.7):
> ```sh
> alias f="$(pay-respects bash)"
> alias f="$(pay-respects zsh)"
@ -100,6 +100,23 @@ Please follow the instruction for your shell:
> - `_PR_LIB`: Directory of modules, analogous to `PATH`. If not provided, search in `PATH` or compile-time provided value.
> - `_PR_PACKAGE_MANAGER`: Use defined package manager instead of auto-detecting alphabetically
> You can specify different modes to run with `_PR_MODE`:
>
> - `noconfirm`: Execute suggestions without confirm
> - `echo`: Print suggestions to `stdout` without executing
> - `cnf`: Used for command not found hook
>
> Example usage with `noconfirm`:
>
> ```sh
> function ff() {
> (
> export _PR_MODE="noconfirm"
> f
> )
> }
> ```
</details>
You can now **press `F` to Pay Respects**!

View file

@ -11,7 +11,7 @@ repository = "https://github.com/iffse/pay-respects"
keywords = ["cli", "terminal", "utility", "shell"]
categories = ["command-line-utilities"]
license = "AGPL-3.0-or-later"
include = ["**/*.rs", "**/*.toml"]
include = ["**/*.rs", "**/*.toml", "templates/**/*"]
[dependencies]
colored = "3"

View file

@ -1,8 +1,8 @@
use crate::shell::Data;
use crate::style::highlight_difference;
use crate::suggestions;
use crate::suggestions::suggest_candidates;
use crate::system;
use crate::style::highlight_difference;
use colored::Colorize;
use inquire::*;
use pay_respects_utils::evals::best_matches_path;
@ -62,9 +62,7 @@ pub fn noconfirm(data: &mut Data) {
};
let candidate = data.candidates[0].clone();
eprintln!("{}",
highlight_difference(data, &candidate).unwrap()
);
eprintln!("{}", highlight_difference(data, &candidate).unwrap());
data.update_suggest(&candidate);
data.candidates.clear();