diff options
| author | Dieter Eickstaedt <eickstaedt@deicon.de> | 2023-10-05 17:54:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-05 15:54:54 +0000 |
| commit | 1735be05d71ec21ffb8648866fca83e210cfe31a (patch) | |
| tree | 88fa1423cd00a16f300c160f8c179232dfaa8db9 | |
| parent | Fix/1207 deleted entries shown in interactive search (#1272) (diff) | |
| download | atuin-1735be05d71ec21ffb8648866fca83e210cfe31a.zip | |
fix(1220): Workspace Filtermode not handled in skim engine (#1273)
* fix(1220): Workspace Filtermode not handled in skim engine
* fix: review suggestion accepted
| -rw-r--r-- | atuin/src/command/client/search/engines/skim.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/atuin/src/command/client/search/engines/skim.rs b/atuin/src/command/client/search/engines/skim.rs index 06b717e4..e24eca7b 100644 --- a/atuin/src/command/client/search/engines/skim.rs +++ b/atuin/src/command/client/search/engines/skim.rs @@ -54,6 +54,11 @@ async fn fuzzy_search( yield_now().await; } let context = &state.context; + let git_root = context + .git_root + .as_ref() + .and_then(|git_root| git_root.to_str()) + .unwrap_or(&context.cwd); match state.filter_mode { FilterMode::Global => {} // we aggregate host by ',' separating them @@ -72,6 +77,7 @@ async fn fuzzy_search( .contains(&context.session.as_bytes()) => {} // we aggregate directory by ':' separating them FilterMode::Directory if history.cwd.split(':').contains(&context.cwd.as_str()) => {} + FilterMode::Workspace if history.cwd.split(':').contains(&git_root) => {} _ => continue, } #[allow(clippy::cast_lossless, clippy::cast_precision_loss)] |
