zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: [PATCH] Fix flags in zsh-mime-setup so that they are utilized correctly
Date: Mon, 23 Oct 2023 20:21:05 -0500	[thread overview]
Message-ID: <CAKc7PVARj66feqhyvx9Dd4XHUu=Wi0fNcZew-qDWc+suGbkb6w@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

Hi,
a simple bug – first it sets s=$suffix, to then use $suffix in a
crucial place, while it supposed to use the work-var $s

-- 
Best regards,
Sebastian Gniazdowski

[-- Attachment #2: 0001-fix-use-work-var-s-not-suffix-when-setting-flags-in-.patch --]
[-- Type: text/x-patch, Size: 800 bytes --]

From 1c2af89d09225b80f94fbd197a339ffd89c4d217 Mon Sep 17 00:00:00 2001
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Date: Mon, 23 Oct 2023 20:08:33 -0500
Subject: [PATCH] fix: use work-var $s not $suffix when setting flags in
 zsh-mime-setup

---
 Functions/MIME/zsh-mime-handler | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Functions/MIME/zsh-mime-handler b/Functions/MIME/zsh-mime-handler
index 288a0796d..2feacf063 100644
--- a/Functions/MIME/zsh-mime-handler
+++ b/Functions/MIME/zsh-mime-handler
@@ -193,7 +193,7 @@ if ! zsh-mime-contexts -s $suffix flags flags; then
   # Same again for flags.
   s=$suffix
   while true; do
-    flags="${zsh_mime_flags[$suffix]}"
+    flags="${zsh_mime_flags[$s]}"
     if [[ -n $flags ]]; then
       break
     fi
-- 
2.34.1


                 reply	other threads:[~2023-10-23 18:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKc7PVARj66feqhyvx9Dd4XHUu=Wi0fNcZew-qDWc+suGbkb6w@mail.gmail.com' \
    --to=sgniazdowski@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).