[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Syntax of "-" in shell-mode
From: |
Dima Kogan |
Subject: |
Re: Syntax of "-" in shell-mode |
Date: |
Fri, 24 Jun 2016 14:05:31 -0700 |
User-agent: |
mu4e 0.9.17; emacs 25.0.94.1 |
Drew Adams <address@hidden> writes:
>> 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.
>
> Maybe not so simple. A shell command can involve lots of stuff,
> including arguments to commands that use their own syntax (think
> `find').
Of course the true syntax depends on context, but in my experience, in
shell commands "-" is a word far more often than it isn't.