On Sat, Oct 06, 2018 at 09:38:42PM +0200, John Ankarström wrote:
> Is there a way for ksh to expand a $(command substitution) without having to
> execute the entire line?
No.

> bash provides this via shell-expand-line (bound to Ctrl-Alt-e by default),
>From bash(1):

        shell-expand-line (M-C-e)
                Expand the line as the shell does.  This performs alias and
                history expansion as well as all of the shell word expansions.

And yet, it disregards quoting and will errornously expand the following
example into multiple words instead of one:

        bash-4.4$ echo "$(echo a b)"
        bash-4.4$ echo a b

> and ksh seems to have expand-file, but that only works for filenames.
We have no other expanding functions.

Reply via email to