diff --git a/crates/owlry-core/src/filter.rs b/crates/owlry-core/src/filter.rs index f90ce8b..0ec34bd 100644 --- a/crates/owlry-core/src/filter.rs +++ b/crates/owlry-core/src/filter.rs @@ -360,6 +360,28 @@ impl ProviderFilter { } } + // Dynamic plugin prefix fallback: ":word " or ":word" where word is unknown + // Maps to Plugin(word) so user plugins with custom prefixes work + if let Some(rest) = trimmed.strip_prefix(':') { + if let Some(space_idx) = rest.find(' ') { + let prefix_word = &rest[..space_idx]; + if !prefix_word.is_empty() && prefix_word.chars().all(|c| c.is_alphanumeric() || c == '-' || c == '_') { + return ParsedQuery { + prefix: Some(ProviderType::Plugin(prefix_word.to_string())), + tag_filter: None, + query: rest[space_idx + 1..].to_string(), + }; + } + } else if !rest.is_empty() && rest.chars().all(|c| c.is_alphanumeric() || c == '-' || c == '_') { + // Partial prefix (no space yet) + return ParsedQuery { + prefix: Some(ProviderType::Plugin(rest.to_string())), + tag_filter: None, + query: String::new(), + }; + } + } + let result = ParsedQuery { prefix: None, tag_filter: None,