diff options
author | Sadrul Habib Chowdhury <sadrul@users.sourceforge.net> | 2009-12-19 14:23:27 -0500 |
---|---|---|
committer | Sadrul Habib Chowdhury <sadrul@users.sourceforge.net> | 2009-12-19 14:23:27 -0500 |
commit | 52efeb8dfc40be5d5ba36253a1dc3af514d0b226 (patch) | |
tree | 1110312bb0f40b724f84e3032d0e50f1d3e0ed86 | |
parent | 84b8ef5de3aa94d6b49e81fe4562694fb12c5d0a (diff) | |
download | screen-52efeb8dfc40be5d5ba36253a1dc3af514d0b226.tar.gz |
Allow no argument to blankerprg.
Without any argument, blankerprg will show the command that would be
executed on 'blanker'. To unset, use an empty string, i.e.
"blankerprg ''".
-rw-r--r-- | src/doc/screen.1 | 3 | ||||
-rw-r--r-- | src/doc/screen.texinfo | 6 | ||||
-rw-r--r-- | src/process.c | 15 |
3 files changed, 21 insertions, 3 deletions
diff --git a/src/doc/screen.1 b/src/doc/screen.1 index de3df24..bbf7975 100644 --- a/src/doc/screen.1 +++ b/src/doc/screen.1 @@ -1094,7 +1094,8 @@ This command is normally used together with the \*Qidle\*U command. .B blankerprg .RI [ "program args" ] .PP -Defines a blanker program. Disables the blanker program if no +Defines a blanker program. Disables the blanker program if an +empty argument is given. Shows the currently set blanker program if no arguments are given. .sp .ne 3 diff --git a/src/doc/screen.texinfo b/src/doc/screen.texinfo index 0bed653..618fa70 100644 --- a/src/doc/screen.texinfo +++ b/src/doc/screen.texinfo @@ -5155,8 +5155,10 @@ command. @end deffn @deffn Command blankerprg [@var{program args}] -Defines a blanker program. Disables the blanker program if -no arguments are given. +Defines a blanker program. Disables the blanker program if an +empty argument is given. Shows the currently set blanker program if no +arguments are given. + @end deffn @node Zmodem, , Screen Saver, Miscellaneous diff --git a/src/process.c b/src/process.c index 0e835f0..76785e1 100644 --- a/src/process.c +++ b/src/process.c @@ -4088,6 +4088,21 @@ int key; break; #ifdef BLANKER_PRG case RC_BLANKERPRG: + if (!args[0]) + { + if (blankerprg) + { + char path[MAXPATHLEN]; + char *p = path, **pp; + for (pp = blankerprg; *pp; pp++) + p += snprintf(p, sizeof(path) - (p - path) - 1, "%s ", *pp); + *(p - 1) = '\0'; + Msg(0, "blankerprg: %s", path); + } + else + Msg(0, "No blankerprg set."); + break; + } if (blankerprg) { char **pp; |