summaryrefslogtreecommitdiffstats
path: root/src/verb/external_execution_mode.rs
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2020-05-01 14:01:02 +0200
committerCanop <cano.petrole@gmail.com>2020-05-01 21:31:53 +0200
commit0199162bc8d4fee5bb7f07fbb41570df95205057 (patch)
tree74c6bb798700b7dc7cc21c0173319f6ee51ba02c /src/verb/external_execution_mode.rs
parentcf52bbe7dc19cba78d65f431caa2af36c23da589 (diff)
command/verb/apply refactoring
* simpler, with immutable commands * more commands can be triggered by shortcuts * one can apply verbs to the input (using shortcuts)
Diffstat (limited to 'src/verb/external_execution_mode.rs')
-rw-r--r--src/verb/external_execution_mode.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/verb/external_execution_mode.rs b/src/verb/external_execution_mode.rs
index f120c3b..b81960e 100644
--- a/src/verb/external_execution_mode.rs
+++ b/src/verb/external_execution_mode.rs
@@ -1,7 +1,5 @@
-
#[derive(Debug, Clone, Copy)]
pub enum ExternalExecutionMode {
-
/// executed in the parent shell, on broot leaving, using the `br` function
FromParentShell,
@@ -10,10 +8,8 @@ pub enum ExternalExecutionMode {
/// executed in a sub process without quitting broot
StayInBroot,
-
}
-
impl ExternalExecutionMode {
pub fn from_shell(self) -> bool {
match self {
@@ -29,8 +25,8 @@ impl ExternalExecutionMode {
}
pub fn from_conf(
- from_shell: &Option<bool>, // default is false
- leave_broot: &Option<bool>, // default is true
+ from_shell: Option<bool>, // default is false
+ leave_broot: Option<bool>, // default is true
) -> Self {
if from_shell.unwrap_or(false) {
Self::FromParentShell