[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About `M-C-e` expand result `'` failed
From: |
Zachary Santer |
Subject: |
Re: About `M-C-e` expand result `'` failed |
Date: |
Tue, 30 Jan 2024 06:48:24 -0500 |
Even if this doesn't happen, you still don't end up with the command line
you probably wanted.
$ echo "$(echo $'ab\ncd\nef')" # enter
ab
cd
ef
$ echo "$(echo $'ab\ncd\nef')" # input M-C-e
$ echo ab
cd
ef # enter
ab
-bash: ef: command not found
And yes, that did change my working directory to my home directory.
Would it be unreasonable to expect that the argument to the outermost echo
after M-C-e still be in double-quotes? Or potentially placed in
single-quotes. That way, the line would be evaluated the same way as it
would've been without M-C-e.
Compare:
$ echo $(echo $'ab\ncd\nef') # enter
ab cd ef
$ echo $(echo $'ab\ncd\nef') # input M-C-e
$ echo ab cd ef # enter
ab cd ef
which was kind of surprising but arguably correct.
- About `M-C-e` expand result `'` failed, A4-Tacks, 2024/01/29
- Re: About `M-C-e` expand result `'` failed,
Zachary Santer <=
- Re: About `M-C-e` expand result `'` failed, Zachary Santer, 2024/01/30
- Re: About `M-C-e` expand result `'` failed, A4-Tacks, 2024/01/30
- Re: About `M-C-e` expand result `'` failed, Zachary Santer, 2024/01/30
- Re: About `M-C-e` expand result `'` failed, Andreas Schwab, 2024/01/30
- Re: About `M-C-e` expand result `'` failed, Zachary Santer, 2024/01/30
- Re: About `M-C-e` expand result `'` failed, Chet Ramey, 2024/01/31
- Re: About `M-C-e` expand result `'` failed, Mike Jonkmans, 2024/01/31