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

Re: [PATCH] edit-command-line breaks arguments with spaces



Ah, right. Thanks!

> On 14. Oct 2017, at 02:07, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> 
> Marco Hinz wrote on Sat, 14 Oct 2017 01:05 +0200:
>> diff --git i/Functions/Zle/edit-command-line w/Functions/Zle/edit-command-line
>> index 353f2609a..5c82e823a 100644
>> --- i/Functions/Zle/edit-command-line
>> +++ w/Functions/Zle/edit-command-line
>> @@ -22 +22 @@
>> -      ${=editor} -c "normal! ${byteoffset}go" -- $1;;
>> +      eval "${editor[@]} -c 'normal! ${byteoffset}go' -- $1";;
>> @@ -25,2 +25,2 @@
>> -      ${=editor} +${#lines}:$((${#lines[-1]} + 1)) $1;;
>> -    (*) ${=editor} $1;;
>> +      eval "${editor[@]} +${#lines}:$((${#lines[-1]} + 1)) $1";;
>> +    (*) eval "${editor[@]} $1";;
> 
> LGTM, except that $1 should be changed into ${(q)1} due to the eval.



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