Closed alessandroberna closed 1 month ago
This solves the problem I'm having on Mac.
Is this is a duplicate of PR #74 but without any shellcheck
ing? 🤔
Is this is a duplicate of PR #74 but without any
shellcheck
ing? 🤔
PR #74 doesn't check for the installed imagemagick version and just replaces convert
with magick
.
I haven't had the time to test it out but it should break compatibility with earlier imagemagick versions.
Well, there are now three PRs dealing with issue #71 plus shellcheck
(has been fixed in PR #74 but not in #73 and there's my PR #75 that has only the shellcheck-fix plus a GitHub Action for automatic shellcheck'ing).
@hackerb9 should decide which one of #73 and #74 suits better and then I will fix my #75 with shellcheck stuff… 🤔 Does everybody involved agree? @sammcj @alessandroberna
I believe that each issue should be addressed in a different PR to make it easier for the maintainer(s) to review the changes. Of course I have no objections to the shellcheck issue or the improved comparison logic. It goes without saying that the repo owner always has the final say on every issue; I'm okay with your proposal, but there isn't much to agree to on my end.
I like that this patch fixes only one thing at a time, but I'm wondering if montage
is also going to be deprecated by ImageMagick 7. It may make more sense to do something like:
magick=$(which magick)
...
$magick convert ... sixel:-
$magick montage ... sixel:-
That way the error message on non-sixel terminals can give the correct command for people to test their terminals:
echo "$magick convert foo.jpg --geometry 800x480 sixel:-"
I believe the latest release fixes this issue, but please re-open if I am mistaken. Thanks!
The convert command has been deprecated starting from ImageMagick 7. Attempting to use the script results in something like this:![image](https://github.com/hackerb9/lsix/assets/53372753/202ae14e-5de8-4325-a938-0ddedb7bc142)
This patch checks for the ImageMagick version and uses the new command if the major version is greater or equal to 7. After applying it, the warnings are no more:![image](https://github.com/hackerb9/lsix/assets/53372753/a1801842-6529-49a6-b0f0-0b2b69cc4a27)
Fixes #71 Fixes #77