From 36e4593b6efcdc21d112441b8b9f2cf477693233 Mon Sep 17 00:00:00 2001
From: obarun <eric@obarun.org>
Date: Mon, 22 Jun 2020 10:15:45 +1100
Subject: [PATCH] set -e options as default option

---
 doc/66-env.md          | 2 +-
 src/lib66/ssexec_env.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/doc/66-env.md b/doc/66-env.md
index c706cfb6..4e454c98 100644
--- a/doc/66-env.md
+++ b/doc/66-env.md
@@ -43,7 +43,7 @@ Lists or replaces an environment variable of a service depending on the options
 
 - **-L** : list defined environment variables for service.
 
-- **-e** : edit the configuration file with `EDITOR` set in your system environment
+- **-e** : edit the configuration file with `EDITOR` set in your system environment. This is the default option if **-L** or **-r** was not passed.
 
 - **-r** *key=value* : override an existing `key=value` pair with the given one. The `key=value` needs to be single quoted in case of multiple arguments.
 
diff --git a/src/lib66/ssexec_env.c b/src/lib66/ssexec_env.c
index 8b3ed44b..5d802595 100644
--- a/src/lib66/ssexec_env.c
+++ b/src/lib66/ssexec_env.c
@@ -72,6 +72,8 @@ int ssexec_env(int argc, char const *const *argv,char const *const *envp,ssexec_
 	if (argc < 1) log_usage(usage_env) ;
 	sv = argv[0] ;
 
+	if (!list && !replace && !edit) edit = 1 ;
+
 	treename = !info->opt_tree ? 0 : info->treename.s ;
 
 	if (!src)
-- 
GitLab