diff options
author | Canop <cano.petrole@gmail.com> | 2020-09-24 22:25:23 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2020-09-24 22:25:23 +0200 |
commit | 6c376ca883a70aa4b646ebcedfea6a87ac52b2d7 (patch) | |
tree | 6f92b01cb3d9abe37ac2254997a2ee4356c07616 /src/verb/verb_execution.rs | |
parent | 60b742fceda175bd1b357280535b27ba5e915d94 (diff) |
allow cmd sequences in verb execution
The syntax changed. Instead of `execution` (which is still allowed),
`internal`, `external` and `cmd` are now prefered.
The syntax of the `cmd` property is the same than the `--cmd`
launch argument, with the added possibility to have dynamic parts.
Two examples of sequence based verbs:
[[verbs]]
name = "myplaces"
key = "ctrl-g"
cmd = ":focus ~;:!focus /"
[[verbs]]
name = "backup"
invocation = "bu {name}"
cmd = ":cp {file}-back_{name};:!focus {file}-back_{name}"
apply_to = "directory"
Fix #277
Diffstat (limited to 'src/verb/verb_execution.rs')
-rw-r--r-- | src/verb/verb_execution.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/verb/verb_execution.rs b/src/verb/verb_execution.rs index 3f0cbac..6390598 100644 --- a/src/verb/verb_execution.rs +++ b/src/verb/verb_execution.rs @@ -1,4 +1,4 @@ -use super::{ExternalExecution, InternalExecution}; +use super::*; /// how a verb must be executed #[derive(Debug, Clone)] @@ -10,4 +10,8 @@ pub enum VerbExecution { /// the verb execution refers to a command that will be executed by the system, /// outside of broot. External(ExternalExecution), + + /// the execution is a sequence similar to what can be given + /// to broot with --cmd + Sequence(SequenceExecution), } |