aboutsummaryrefslogtreecommitdiffstats
path: root/src/actions.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions.c')
-rw-r--r--src/actions.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/actions.c b/src/actions.c
index 70705e4..e6eb3d3 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -213,10 +213,10 @@ int run_SEARCH(UserOpt *opt, Conf *conf) {
if (list_size(paths)) {
do {
FILE *cmd;
- char result[4096] = "";
- char command[STR_L] = "grep -H -n ";
+ char result[STR_L] = "";
+ char command[STR_L] = "grep -H -n \"";
strcat(command, list_get(opt->args));
- strcat(command, " ");
+ strcat(command, "\" ");
strcat(command, list_get(paths));
cmd = popen(command, "r");
if (cmd == NULL) {