Error run command in terminal #3

Closed
opened 2018-10-29 04:06:37 +00:00 by rtyler · 0 comments
Owner

Author: @miramir Posted at: 16.04.2011 16:26

When run the command such a "vim ~ / test.txt" terminal (such lilyterm) displays a message that the command "vim ~ / test.txt" does not exist. This is because, at the start passed as a quoted string, and terminal interprets it all as a name of command. The patch corrects this behavior:

diff -rc gmrun-0.9.2.orig/src/main.cc gmrun-0.9.2/src/main.cc
*** gmrun-0.9.2.orig/src/main.cc    2011-04-16 22:13:38.378062649 +0600
--- gmrun-0.9.2/src/main.cc 2011-04-16 22:14:00.173049908 +0600
***************
*** 295,302 ****
        term = "xterm -e";
      }
      tmp = term;
!     tmp += " '";
!     tmp += command + "'";
    } else {
      if (!configuration.get_string("Terminal", term)) {
        tmp = "xterm";
--- 295,302 ----
        term = "xterm -e";
      }
      tmp = term;
!     tmp += " ";
!     tmp += command;
    } else {
      if (!configuration.get_string("Terminal", term)) {
        tmp = "xterm";
Author: @miramir Posted at: 16.04.2011 16:26 When run the command such a "vim ~ / test.txt" terminal (such lilyterm) displays a message that the command "vim ~ / test.txt" does not exist. This is because, at the start passed as a quoted string, and terminal interprets it all as a name of command. The patch corrects this behavior: <pre> diff -rc gmrun-0.9.2.orig/src/main.cc gmrun-0.9.2/src/main.cc *** gmrun-0.9.2.orig/src/main.cc 2011-04-16 22:13:38.378062649 +0600 --- gmrun-0.9.2/src/main.cc 2011-04-16 22:14:00.173049908 +0600 *************** *** 295,302 **** term = "xterm -e"; } tmp = term; ! tmp += " '"; ! tmp += command + "'"; } else { if (!configuration.get_string("Terminal", term)) { tmp = "xterm"; --- 295,302 ---- term = "xterm -e"; } tmp = term; ! tmp += " "; ! tmp += command; } else { if (!configuration.get_string("Terminal", term)) { tmp = "xterm"; </pre>
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: rtyler/graphite-tools#3
No description provided.