1 mod builtin;
2 mod exec_pattern;
3 mod execution_builder;
4 mod external_execution;
5 mod external_execution_mode;
6 mod internal;
7 mod internal_execution;
8 pub mod internal_focus;
9 mod invocation_parser;
10 mod sequence_execution;
11 mod verb;
12 mod verb_description;
13 mod verb_execution;
14 mod verb_invocation;
15 mod verb_store;
16 
17 pub use {
18     exec_pattern::*,
19     execution_builder::ExecutionStringBuilder,
20     external_execution::ExternalExecution,
21     external_execution_mode::ExternalExecutionMode,
22     internal::Internal,
23     internal_execution::InternalExecution,
24     invocation_parser::InvocationParser,
25     once_cell::sync::Lazy,
26     sequence_execution::SequenceExecution,
27     verb::Verb,
28     verb_description::VerbDescription,
29     verb_execution::VerbExecution,
30     verb_invocation::*,
31     verb_store::{PrefixSearchResult, VerbStore},
32 };
33 use {
34     lazy_regex::*,
35 };
36 
37 /// the group you find in invocation patterns and execution patterns
38 pub static GROUP: Lazy<Regex> = lazy_regex!(r"\{([^{}:]+)(?::([^{}:]+))?\}");
39 
str_has_selection_group(s: &str) -> bool40 pub fn str_has_selection_group(s: &str) -> bool {
41     GROUP.find_iter(s)
42         .any(|group| matches!(
43             group.as_str(),
44             "{file}" | "{file-name}" | "{parent}" | "{directory}",
45         ))
46 }
str_has_other_panel_group(s: &str) -> bool47 pub fn str_has_other_panel_group(s: &str) -> bool {
48     for group in GROUP.find_iter(s) {
49         if group.as_str().starts_with("{other-panel-") {
50             return true;
51         }
52     }
53     false
54 }
55 
56