On Fri, Feb 02, 2024 at 10:09:53AM -0500, Chet Ramey wrote: > On 2/2/24 8:12 AM, Mike Jonkmans wrote: > > On Thu, Feb 01, 2024 at 08:14:34PM -0500, Chet Ramey wrote: > > "There are seven kinds of expansion..." then three sentences later comes > > quote removal. The reader may wonder whether quote removal is an expansion. > OK, then how about we enumerate the word expansions without numbering them.
Maybe: Several kinds of expansion are performed in order: first brace expansion; then tilde expansion, parameter and variable expansion, command substitution and arithmetic expansion (done in a left-to-right fashion); word splitting; pathname expansion and finally quote removal. Then the alinea about the order and the alinea on quote removal could be removed. > shell-expand-line (M-C-e) > Expand the line by performing shell word expansions. This per- > forms alias and history expansion, $'string' and $"string" quot- > ing, tilde expansion, parameter and variable expansion, arith- > metic expansion, word splitting, and quote removal. See HISTORY > EXPANSION below for a description of history expansion. That form is clearer indeed. But isn't that missing `, process substitution (if available)'? > > Maybe it is confusing that a (quote) removal is an expansion. Oh well. > What is the logic here? Expansion is making things bigger. Removal is more like contraction. > > Then after review of the expansion, I could accept it. > Then undo the editing operation and let the expansions happen all over > again as part of command execution. That is a nice tip. I didn't realize that it was possible to undo. So normally I would avoid using expansions. :) -- Regards, Mike Jonkmans