aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2019-08-22 15:48:59 +0100
committersin <sin@2f30.org>2019-08-22 17:21:29 +0100
commitabce18b913ffbe3caf85bca368757e306a9d2b6e (patch)
tree5f816279932e80b5365ad134c0860bdcd023baba
parent022e61ed65c4b5363e9cd8767676816834c8a9fb (diff)
downloadnoice-abce18b913ffbe3caf85bca368757e306a9d2b6e.tar.gz
Allow overriding plumber via NOPEN env variable
-rw-r--r--TODO1
-rw-r--r--noice.110
-rw-r--r--noice.c5
3 files changed, 12 insertions, 4 deletions
diff --git a/TODO b/TODO
index cb08dca..e69de29 100644
--- a/TODO
+++ b/TODO
@@ -1 +0,0 @@
-- Support overriding plumber via environment variable
diff --git a/noice.1 b/noice.1
index 2aa6873..1f41958 100644
--- a/noice.1
+++ b/noice.1
@@ -1,4 +1,4 @@
-.Dd August 2, 2019
+.Dd August 22, 2019
.Dt NOICE 1
.Os
.Sh NAME
@@ -117,6 +117,14 @@ environment variables take precedence when dealing with the
and
.Ic p
commands respectively.
+.Pp
+The
+.Ev NOPEN
+environment variable can be used to specify the plumber
+program used by
+.Nm .
+It defaults to
+.Xr nopen 1 .
.Sh KNOWN ISSUES
If you are using
.Xr urxvt 1
diff --git a/noice.c b/noice.c
index 1b60370..cf3afcf 100644
--- a/noice.c
+++ b/noice.c
@@ -650,10 +650,11 @@ nochange:
goto begin;
case S_IFREG:
exitcurses();
- r = spawnlp(path, NOPENCMD, NOPENCMD, newpath, (void *)0);
+ run = xgetenv("NOPEN", NOPENCMD);
+ r = spawnlp(path, run, run, newpath, (void *)0);
initcurses();
if (r == -1) {
- printmsg("failed to execute " NOPENCMD);
+ printmsg("Failed to execute plumber");
goto nochange;
}
continue;
Un proyecto texto-plano.xyz