[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33037: 27.0.50; [PATCH] Support program switches in 'comint-run' com

From: Phil Sainty
Subject: bug#33037: 27.0.50; [PATCH] Support program switches in 'comint-run' command
Date: Sun, 14 Oct 2018 17:42:36 +1300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

This patch enables arguments to be passed to the specified program when
invoking `comint-run'.

Interactively, a prefix argument C-u will make the command prompt for
the switches (as a string) after prompting for the program.  The
switches are processed with `split-string-and-unquote'.

I think this is a sensible enhancement, but not necessarily the best
user interface.  Other possibilities which occur are:

1. Do not require a prefix arg, and simply make this the default
   prompting behaviour.

2. Do not require a separate prompt, and instead parse the program
   and its switches out of a single string.

Either of those would mean that the user doesn't need to bother with
(or remember to use) a prefix argument to enable something which is
arguably important enough to happen by default.

Option (2) is an issue when PROGRAM contains spaces, as the user would
now need to quote that value, which is not currently necessary.  Maybe
the benefits make that a worthwhile change, though?  (i.e. greater ease
of use for the 'normal' use-cases where the path to the program does
not contain spaces).

I suppose option (3) might be "all of the above", with a user option
to select the preferred prompting behaviour, but that might be overkill.

...all of which reminds me that I've been meaning to write a similar
patch to allow switches to be specified for the `term' and `ansi-term'
commands, and a consistent approach in all cases would seem sensible;
so that's something else to keep in mind.


Attachment: 0001-Support-program-switches-in-comint-run-command.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]