From 57708c91ccd454c124b4e5fd174a1d76cf581c61 Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Tue, 16 Nov 2004 22:41:00 +0000 Subject: [PATCH] * user.c (execute_menu_command): Prefix the command with a space to prevent recording in ~/.bash_history. --- src/ChangeLog | 2 ++ src/user.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 06a84aa94..89e29493e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,8 @@ 2004-11-15 Leonard den Ottolander * file.c: Code cleanup (mostly indentation). + * user.c (execute_menu_command): Prefix the command with a space + to prevent recording in ~/.bash_history. 2004-11-12 Pavel Shirshov diff --git a/src/user.c b/src/user.c index 9dfa18a6b..8daa896f4 100644 --- a/src/user.c +++ b/src/user.c @@ -546,7 +546,7 @@ execute_menu_command (WEdit *edit_widget, const char *commands) int do_quote = 0; char prompt [80]; int col; - char *file_name; + char *file_name, *space_file_name; int run_view = 0; /* Skip menu entry title line */ @@ -632,14 +632,16 @@ execute_menu_command (WEdit *edit_widget, const char *commands) } fclose (cmd_file); chmod (file_name, S_IRWXU); + space_file_name = g_strconcat (" ", file_name, (char *) NULL); if (run_view) { run_view = 0; - view (file_name, 0, &run_view, 0); + view (space_file_name, 0, &run_view, 0); } else { - shell_execute (file_name, 0); + shell_execute (space_file_name, 0); } unlink (file_name); g_free (file_name); + g_free (space_file_name); } /*