diff options
| author | a-kenji <aks.kenji@protonmail.com> | 2021-04-21 15:26:05 +0200 |
|---|---|---|
| committer | a-kenji <aks.kenji@protonmail.com> | 2021-04-21 15:26:05 +0200 |
| commit | 8823bef7c1db8f53c024fad0e48f52b2204addc0 (patch) | |
| tree | 1a8c4ba057b30aa10e737d78026b705d69537390 /src | |
| parent | Merge pull request #300 from a-kenji/config-command (diff) | |
| download | sl0ppij-8823bef7c1db8f53c024fad0e48f52b2204addc0.tar.gz sl0ppij-8823bef7c1db8f53c024fad0e48f52b2204addc0.tar.xz sl0ppij-8823bef7c1db8f53c024fad0e48f52b2204addc0.zip | |
Add ZELLIJ Environment Varable on startup(#304)
Makes it easy and flexible to check
whether zellij is already running.
This carries no further information
for now and is initialised to `0`.
closes 304.
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/mod.rs b/src/common/mod.rs index e2cd2220..1a26e108 100644 --- a/src/common/mod.rs +++ b/src/common/mod.rs @@ -16,6 +16,7 @@ use std::thread; use std::{collections::HashMap, fs}; use std::{ collections::HashSet, + env, io::Write, str::FromStr, sync::{Arc, Mutex}, @@ -128,6 +129,8 @@ pub fn start(mut os_input: Box<dyn OsApi>, opts: CliArgs) { .write(take_snapshot.as_bytes()) .unwrap(); + env::set_var(&"ZELLIJ", "0"); + let config = Config::from_cli_config(opts.config, opts.option) .map_err(|e| { eprintln!("There was an error in the config file:\n{}", e); |
