mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
872d9a285b
commit
67e7b79148
2 changed files with 2 additions and 5 deletions
|
|
@ -33,8 +33,6 @@ impl Control {
|
|||
if let Some(ref s) = self.desc { Cow::Borrowed(s) } else { self.run().into() }
|
||||
}
|
||||
|
||||
pub fn key_desc(&self) -> String { format!("`{}` ({})", self.on(), self.desc_or_run()) }
|
||||
|
||||
#[inline]
|
||||
pub fn contains(&self, s: &str) -> bool {
|
||||
let s = s.to_lowercase();
|
||||
|
|
|
|||
|
|
@ -65,12 +65,11 @@ pub fn init() -> anyhow::Result<()> {
|
|||
continue;
|
||||
}
|
||||
if !r.bool("confirm") && !r.bool("interactive") {
|
||||
let key_desc = c.key_desc();
|
||||
let s = format!("`{}` ({})", c.on(), c.desc_or_run());
|
||||
eprintln!(
|
||||
r#"WARNING: In Yazi v0.3, the behavior of the interactive `shell` (i.e., shell templates) must be explicitly specified with either `--interactive` or `--confirm`.
|
||||
|
||||
Please replace e.g. `shell` with `shell --interactive`, `shell "my-template"` with `shell "my-template" --interactive`, in your keymap.toml
|
||||
for the key {key_desc}"#
|
||||
Please replace e.g. `shell` with `shell --interactive`, `shell "my-template"` with `shell "my-template" --interactive`, in your keymap.toml for the key: {s}"#
|
||||
);
|
||||
return Ok(());
|
||||
} else if r.bool("confirm") && r.bool("interactive") {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue