Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Fun thing, manual execution of $( ) command substitution



On 20 May 2018 at 15:59, Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
>     [[ "${cmds[1]}" = "$buffer" ]] && return 0

I have a bug-fix, someone might one day use it and become confused –
REPLY isn't set to "$buffer" in the line above. So:

    [[ "${cmds[1]}" = "$buffer" ]] && { REPLY="$buffer"; return 0; }

I.e. no $( ) areas detected in buffer -> return unchanged buffer (no
command substitution done).

-- 
Best regards,
Sebastian Gniazdowski



Messages sorted by: Reverse Date, Date, Thread, Author