summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBasile Starynkevitch <basile.starynkevitch@inria.fr>2003-10-29 15:22:56 +0000
committerBasile Starynkevitch <basile.starynkevitch@inria.fr>2003-10-29 15:22:56 +0000
commit8970df4f01be938d0c57e9e96bfa443e17ce9beb (patch)
tree9a96bbab8213f580f840ce54606eae86f9ed84e4
parent970eb989d507a442954a6c1369972f77a1e8f618 (diff)
downloadocaml-8970df4f01be938d0c57e9e96bfa443e17ce9beb.tar.gz
several arguments for shell command
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5892 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--debugger/command_line.ml9
1 files changed, 6 insertions, 3 deletions
diff --git a/debugger/command_line.ml b/debugger/command_line.ml
index cebe90bb6a..81b40580b3 100644
--- a/debugger/command_line.ml
+++ b/debugger/command_line.ml
@@ -210,9 +210,12 @@ let instr_cd ppf lexbuf =
error s
let instr_shell ppf lexbuf =
- let cmd = argument_eol argument lexbuf in
+ let cmdarg = argument_list_eol argument lexbuf in
+ let cmd = String.concat " " cmdarg in
+ (* perhaps we should use $SHELL -c ? *)
let err = Sys.command cmd in
- if (err != 0) then eprintf "Shell command %S failed with exit code %d\n%!" cmd err
+ if (err != 0) then
+ eprintf "Shell command %S failed with exit code %d\n%!" cmd err
let instr_pwd ppf lexbuf =
eol lexbuf;
@@ -898,7 +901,7 @@ With no argument, reset the search path." };
"exit the debugger." };
{ instr_name = "shell"; instr_prio = false;
instr_action = instr_shell; instr_repeat = true; instr_help =
-"Execute a given COMMAND thru the shell." };
+"Execute a given COMMAND thru the system shell." };
(* Displacements *)
{ instr_name = "run"; instr_prio = true;
instr_action = instr_run; instr_repeat = true; instr_help =