summaryrefslogtreecommitdiffstats
path: root/src/verb/verb.rs
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2022-03-27 20:48:30 +0200
committerCanop <cano.petrole@gmail.com>2022-03-27 20:48:30 +0200
commita697c79919301313a6942808363f5a9483c3b1d7 (patch)
treee5d718af7d3a67028302411c7206fbc8a1d41c2f /src/verb/verb.rs
parenta9c90d1d98d52db4e27f0484303dc157b431519c (diff)
verb filtering by file extension
Fix #508
Diffstat (limited to 'src/verb/verb.rs')
-rw-r--r--src/verb/verb.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/verb/verb.rs b/src/verb/verb.rs
index 14b8777..701f3d9 100644
--- a/src/verb/verb.rs
+++ b/src/verb/verb.rs
@@ -48,6 +48,9 @@ pub struct Verb {
/// the type of selection this verb applies to
pub selection_condition: SelectionType,
+ /// extension filtering. If empty, all extensions apply
+ pub file_extensions: Vec<String>,
+
/// whether the verb needs a selection
pub needs_selection: bool,
@@ -101,6 +104,7 @@ impl Verb {
execution,
description,
selection_condition: SelectionType::Any,
+ file_extensions: Vec::new(),
needs_selection,
needs_another_panel,
auto_exec: true,