zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] Fix flags in zsh-mime-setup so that they are utilized correctly
@ 2023-10-24  1:21 Sebastian Gniazdowski
  0 siblings, 0 replies; only message in thread
From: Sebastian Gniazdowski @ 2023-10-24  1:21 UTC (permalink / raw)
  To: Zsh hackers list

[-- 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-23 18:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-24  1:21 [PATCH] Fix flags in zsh-mime-setup so that they are utilized correctly Sebastian Gniazdowski

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).