[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Syntax of "-" in shell-mode
From: |
Eli Zaretskii |
Subject: |
Re: Syntax of "-" in shell-mode |
Date: |
Sat, 25 Jun 2016 10:06:05 +0300 |
> From: Dima Kogan <address@hidden>
> Date: Fri, 24 Jun 2016 13:48:38 -0700
>
> Hi. What do people think about giving "-" a syntax of "word" in
> shell-mode? The rationale is that in this mode one is generally editing
> shell commands where "-" precedes commandline options, and strings such
> as "--help" generally represent a single semantic token.
>
> More specifically if I have something like "xxx --yyy" with the point in
> the whitespace, and I invoke (transpose-words) I want the result to be
> "--yyy xxx" and not "yyy --xxx". The latter means something very
> different in a shell command.
If the problem is with transpose-words, then a possible solution might
be a new shell-transpose-words command, which is smart enough to DTRT
in these cases, at least as a user option? Would you like to propose
such an addition to sh-script.el?