- struct cmd_list_element *c;
-
- c = add_com ("tty", class_run, tty_command,
- "Set terminal for future runs of program being debugged.");
- set_cmd_completer (c, filename_completer);
-
- c = add_set_cmd ("args", class_run, var_string_noescape,
- (char *) &inferior_args,
- "Set argument list to give program being debugged when it is started.\n\
-Follow this command with any number of args, to be passed to the program.",
- &setlist);
- set_cmd_completer (c, filename_completer);
- set_cmd_sfunc (c, notice_args_set);
- c = add_show_from_set (c, &showlist);
- set_cmd_sfunc (c, notice_args_read);
-
- c = add_cmd
- ("environment", no_class, environment_info,
- "The environment to give the program, or one variable's value.\n\
+ struct cmd_list_element *c = NULL;
+
+ /* add the filename of the terminal connected to inferior I/O */
+ add_setshow_filename_cmd ("inferior-tty", class_run,
+ &inferior_io_terminal, _("\
+Set terminal for future runs of program being debugged."), _("\
+Show terminal for future runs of program being debugged."), _("\
+Usage: set inferior-tty /dev/pts/1"), NULL, NULL, &setlist, &showlist);
+ add_com_alias ("tty", "set inferior-tty", class_alias, 0);
+
+ add_setshow_optional_filename_cmd ("args", class_run,
+ &inferior_args, _("\
+Set argument list to give program being debugged when it is started."), _("\
+Show argument list to give program being debugged when it is started."), _("\
+Follow this command with any number of args, to be passed to the program."),
+ notice_args_set,
+ notice_args_read,
+ &setlist, &showlist);
+
+ c = add_cmd ("environment", no_class, environment_info, _("\
+The environment to give the program, or one variable's value.\n\