From b10bfccfc024080145f19d7f37eabb0916f95fe7 Mon Sep 17 00:00:00 2001 From: Patrick Winnertz Date: Fri, 13 Feb 2009 17:57:01 +0100 Subject: [PATCH] Remove some of the SHELL_ESCAPE_STR Stuff... Signed-off-by: Patrick Winnertz --- src/complete.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/complete.c b/src/complete.c index cf7fa23a4..6512fa548 100644 --- a/src/complete.c +++ b/src/complete.c @@ -39,7 +39,6 @@ #include "widget.h" #include "wtools.h" #include "main.h" -#include "util.h" #include "key.h" /* XCTRL and ALT macros */ typedef char *CompletionFunction (char * text, int state, INPUT_COMPLETE_FLAGS flags); @@ -203,9 +202,7 @@ filename_completion_function (char *text, int state, INPUT_COMPLETE_FLAGS flags) if (temp && (flags & INPUT_COMPLETE_SHELL_ESC)) { - SHELL_ESCAPED_STR e_temp = shell_escape(temp); - g_free (temp); - temp = e_temp.s; + temp = shell_escape(temp); } return temp; } @@ -483,9 +480,8 @@ command_completion_function (char *text, int state, INPUT_COMPLETE_FLAGS flags) p = filename_completion_function (text, state, flags); if (!p) return 0; - SHELL_ESCAPED_STR e_p = shell_escape(p); - g_free(p); - return e_p.s; + p = shell_escape(p); + return p; } found = NULL; @@ -541,9 +537,9 @@ command_completion_function (char *text, int state, INPUT_COMPLETE_FLAGS flags) if ((p = strrchr (found, PATH_SEP)) != NULL) { p++; - SHELL_ESCAPED_STR e_p = shell_escape(p); + p = shell_escape(p); g_free(found); - return e_p.s; + return p; } return found;