Closed sandr01d closed 3 months ago
Good idea to use single quotes, looks way nicer this way @carlfriedrich I'd prefer using the single quotes for the outer quotes and updated the accordingly. Do you approve?
@sandr01d I just did a quick echo $opts
for testing, and it seems the outer single quotes do not work because we also use single qoutes within $escaped_commits
. So the preview
arg renders as follows:
--preview='/home/tim/packages/forgit/bin/git-forgit diff_view {} "3" 'HEAD^' '
It works anyway, but it's still not what we want, I guess.
@sandr01d I just did a quick
echo $opts
for testing, and it seems the outer single quotes do not work because we also use single qoutes within$escaped_commits
. So thepreview
arg renders as follows:--preview='/home/tim/packages/forgit/bin/git-forgit diff_view {} "3" 'HEAD^' '
It works anyway, but it's still not what we want, I guess.
@carlfriedrich
You're right, good catch! I think in this case the right way to go is to use double quotes for outer and single quotes for inner quotation. I've updated this PR accordingly. I've printed out the assigned $opts
variable and it does look correct to me now. Could you give it a second look?
Looks good to me now, thanks for the update!
Check list
Description
The
$_forgit_preview_context
variable used in the deferred code block for generating the preview of_forgit_diff
was not quoted. No known bugs were caused by this, just making sure we follow best practices.Note
This is a follow-up to #326 and was originally discussed here.
Type of change
Test environment