Path: csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail From: =?UTF-8?Q?P=c3=a1draig_Brady?= Newsgroups: gnu.bash.bug Subject: Re: shell-expand-line drops quotation marks Date: Wed, 4 Nov 2015 14:45:40 +0000 Lines: 29 Approved: bug-bash@gnu.org Message-ID: References: <563A0C7A.8030504@case.edu> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: usenet.stanford.edu 1446648348 12894 208.118.235.17 (4 Nov 2015 14:45:48 GMT) X-Complaints-To: action@cs.stanford.edu Cc: Keith Thompson To: chet.ramey@case.edu, Keith Thompson , bug-bash@gnu.org Envelope-to: bug-bash@gnu.org X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhkRABAZOlZtT48l/2dsb2JhbABeDoJbUoMLvWiDPoJVAoE9TAEBAQEBAYELhDUBAQEDASMPAUYQCw0LAgIFFgsCAgkDAgECAUUGAQwIAQGIIgwBsHSFbYscAQEBAQYCIYEChFiFeYd1gUMFlkiWVZMPY4NGPj6FaAEBAQ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: <563A0C7A.8030504@case.edu> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.233.128.44 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:11835 On 04/11/15 13:47, Chet Ramey wrote: > On 11/3/15 7:44 PM, Keith Thompson wrote: >> The shell-expand-line command (bound to Escape-Ctrl-E) incorrectly removes >> quotation marks from >> the command line, often resulting in a command that differs from what the >> user intended to type. > > This is the documented behavior. shell-expand-line performs all of the > shell word expansions, including quote removal. How useful is that though when the expansion gives a different meaning? >> I often type Escape-Ctrl-E to expand a history substitution in place >> before typing Enter, but it has the side effect of stripping quotes from >> what I've already typed. > > If you want to perform history expansion, try M-^ (history-expand-line). Yes this is useful. I've set it up to happen automatically with this in my .inputrc $if Bash # do history expansion when space entered Space: magic-space $endif cheers, Pádraig.