diff --git a/doc/66-env.md b/doc/66-env.md index c706cfb6e68753a011fe3fc2f52f5657f5c34590..4e454c9861f8c0e0c85f8ad94311758d30f8cab1 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 8b3ed44b564b23d34f68b9b99e39af522214eb6b..5d802595434a068eeed76e299e5e8b10324683a1 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)