summaryrefslogtreecommitdiff
path: root/src/plugins/exec/exec-command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/exec/exec-command.c')
-rw-r--r--src/plugins/exec/exec-command.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/plugins/exec/exec-command.c b/src/plugins/exec/exec-command.c
index bcb82e994..1ba3bf53c 100644
--- a/src/plugins/exec/exec-command.c
+++ b/src/plugins/exec/exec-command.c
@@ -1,7 +1,7 @@
/*
* exec-command.c - exec command
*
- * Copyright (C) 2014-2017 Sébastien Helleu <flashcode@flashtux.org>
+ * Copyright (C) 2014-2018 Sébastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
@@ -108,11 +108,13 @@ exec_command_list ()
{
/* process has ended */
local_time = localtime (&ptr_exec_cmd->start_time);
- strftime (str_time1, sizeof (str_time1),
- "%Y-%m-%d %H:%M:%S", local_time);
+ if (strftime (str_time1, sizeof (str_time1),
+ "%Y-%m-%d %H:%M:%S", local_time) == 0)
+ str_time1[0] = '\0';
local_time = localtime (&ptr_exec_cmd->end_time);
- strftime (str_time2, sizeof (str_time2),
- "%Y-%m-%d %H:%M:%S", local_time);
+ if (strftime (str_time2, sizeof (str_time2),
+ "%Y-%m-%d %H:%M:%S", local_time) == 0)
+ str_time2[0] = '\0';
weechat_printf (NULL,
" %s%s%s %d%s%s%s: %s\"%s%s%s\"%s (%s -> %s, %s)",
weechat_color (weechat_config_string (exec_config_color_flag_finished)),
@@ -333,7 +335,7 @@ exec_command_parse_options (struct t_exec_cmd_options *cmd_options,
if (argv[i][0] == '"')
{
/* search the ending double quote */
- length_total = 1;
+ length_total = 2;
end = i;
while (end < argc)
{
@@ -807,8 +809,9 @@ exec_command_init ()
" || -set <id> <property> <value>"
" || -del <id>|-all [<id>...]"),
N_(" -list: list commands\n"
- " -sh: use the shell to execute the command (WARNING: use this "
- "option ONLY if all arguments are safe, see option -nosh)\n"
+ " -sh: use the shell to execute the command, many commands can "
+ "be piped (WARNING: use this option ONLY if all arguments are "
+ "safe, see option -nosh)\n"
" -nosh: do not use the shell to execute the command (required if "
"the command has some unsafe data, for example the content of a "
"message from another user) (default)\n"