From 3e9678506a4fdb937e4d170249c8ebd30b43464c Mon Sep 17 00:00:00 2001 From: iff Date: Sat, 12 Aug 2023 23:09:56 +0200 Subject: [PATCH] fix: shell execution for fish --- rules/cd.toml | 4 ++-- src/shell.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rules/cd.toml b/rules/cd.toml index 93ef200..e8c5c3d 100644 --- a/rules/cd.toml +++ b/rules/cd.toml @@ -2,13 +2,13 @@ command = "cd" [[match_err]] pattern = [ - "no such file or directory" + "no such file or directory", + "does not exist" ] # as rust runs on its own environment, it's not possible to change # the directory automatically suggest = [ ''' -#[err_contains(no such file or directory)] mkdir -p {{command[1]}} cd {{command[1]}} ''' ] diff --git a/src/shell.rs b/src/shell.rs index 542a982..71d2367 100644 --- a/src/shell.rs +++ b/src/shell.rs @@ -203,7 +203,7 @@ pub fn initialization(shell: &str, binary_path: &str, auto_alias: &str) { init = format!( r#" function {} -d "Terminal command correction" - {} + eval $({}) end "#, auto_alias, init