Skip to content

Commit

Permalink
fix(1220): Workspace Filtermode not handled in skim engine (#1273)
Browse files Browse the repository at this point in the history
* fix(1220): Workspace Filtermode not handled in skim engine

* fix: review suggestion accepted
  • Loading branch information
deicon authored Oct 5, 2023
1 parent f25681d commit 1735be0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions atuin/src/command/client/search/engines/skim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)]
Expand Down

1 comment on commit 1735be0

@vercel
Copy link

@vercel vercel bot commented on 1735be0 Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

atuin-docs – ./

atuin-docs-git-main-atuin.vercel.app
atuin-docs.vercel.app
atuin-docs-atuin.vercel.app

Please sign in to comment.