[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About `M-C-e` expand result `'` failed
From: |
Chet Ramey |
Subject: |
Re: About `M-C-e` expand result `'` failed |
Date: |
Thu, 1 Feb 2024 20:14:34 -0500 |
User-agent: |
Mozilla Thunderbird |
On 1/31/24 6:05 PM, Mike Jonkmans wrote:
The first sentence under EXPANSION may make you think otherwise:
Expansion is performed on the command line after it has been split into
words.
There are seven kinds of expansion performed: brace expansion,
tilde expansion, parameter and variable expansion, command substitution,
arithmetic expansion, word splitting, and pathname expansion.
The third sentence, after this, corrects this:
After these expansions are performed, quote characters present in the
original
word are removed unless they have been quoted themselves (quote removal).
That sentence could also be placed right after the first.
I can rearrange things, but it seems clear already.
Returning to `shell-expand-line'.
As end user I would expect that, running shell-expand-line then accept-line,
would do the same as just an accept-line.
Why would you expect this? You have deliberately introduced an extra
expansion step, similar to using `eval'.
I think that escaping is needed after quote removal in shell-expand-line.
No, that would be another function.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
- Re: About `M-C-e` expand result `'` failed, (continued)
- Re: About `M-C-e` expand result `'` failed, Zachary Santer, 2024/02/02
- Re: About `M-C-e` expand result `'` failed, Chet Ramey, 2024/02/02
- Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed ), Zachary Santer, 2024/02/03
- Re: Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed ), Oğuz, 2024/02/03
- Re: Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed ), Chet Ramey, 2024/02/06
- Re: Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed ), Oğuz, 2024/02/06
- Re: Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed ), Chet Ramey, 2024/02/06
- Re: Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed ), Chet Ramey, 2024/02/06
- Re: Feature request: prompt strings in output from edit-and-execute-command readline function ( was About `M-C-e` expand result `'` failed ), Zachary Santer, 2024/02/06
- Re: About `M-C-e` expand result `'` failed, Martin D Kealey, 2024/02/04
Re: About `M-C-e` expand result `'` failed,
Chet Ramey <=
Re: About `M-C-e` expand result `'` failed, Martin D Kealey, 2024/02/03