diff options
| author | Daniel Jankowski <daniel.jankowski@rub.de> | 2023-12-22 16:12:59 +0100 |
|---|---|---|
| committer | Daniel Jankowski <daniel.jankowski@rub.de> | 2023-12-22 16:12:59 +0100 |
| commit | 25b9a8449d674b5842e80e10ff5d9dd272f7b309 (patch) | |
| tree | 47d012d5b739d7fa5a53e179152b062faa44b53c /src/widgets/command.rs | |
| parent | chore: fix clippy issues (diff) | |
| download | sl0pstatus-25b9a8449d674b5842e80e10ff5d9dd272f7b309.tar.gz sl0pstatus-25b9a8449d674b5842e80e10ff5d9dd272f7b309.tar.xz sl0pstatus-25b9a8449d674b5842e80e10ff5d9dd272f7b309.zip | |
feat: add bench for command widget
Diffstat (limited to '')
| -rw-r--r-- | src/widgets/command.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/command.rs b/src/widgets/command.rs index 17c5e22..cd65105 100644 --- a/src/widgets/command.rs +++ b/src/widgets/command.rs @@ -14,7 +14,7 @@ use crate::render::FormattedPart; use crate::{config::ZellijState, widgets::widget::Widget}; -const TIMESTAMP_FORMAT: &str = "%s"; +pub const TIMESTAMP_FORMAT: &str = "%s"; lazy_static! { static ref COMMAND_REGEX: Regex = Regex::new("_[a-zA-Z0-9]+$").unwrap(); @@ -115,6 +115,7 @@ fn run_command_if_needed(command_config: CommandConfig, name: &str, state: &Zell let command = commandline_parser(&command_config.command); let command = command.iter().map(|x| x.as_str()).collect::<Vec<&str>>(); + #[cfg(not(feature = "bench"))] run_command(&command, context); } } |
