From cbde794c899d04524a486d5d0f82b8e2d889cdb8 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 19 Jul 2018 22:11:14 +0100 Subject: New ComX specifying error output string (closes #342) --- readme.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 92727bb..2022adf 100644 --- a/readme.md +++ b/readme.md @@ -1284,7 +1284,20 @@ _uname_ only once), while Run Com "date" ["+\"%a %b %_d %H:%M\""] "mydate" 600 -can be used in the output template as `%mydate%` +can be used in the output template as `%mydate%`. + +Sometimes, you don't mind if the command executed exits with an error, +or you might want to display a custom message in that case. To that +end, you can use the `ComX` variant: + +`ComX ProgramName Args ExitMessage Alias RefreshRate` + +Works like `Com`, but displaying `ExitMessage` (a string) if the +execution fails. For instance: + + Run ComX "date" ["+\"%a %b %_d %H:%M\""] "N/A" "mydate" 600 + +will display "N/A" if for some reason the `date` invocation fails. ## Other Plugins -- cgit v1.2.3