From 23e3553405f311e2bc17d65dfcd21d27837684fc Mon Sep 17 00:00:00 2001 From: RGBCube Date: Tue, 6 May 2025 15:28:16 +0300 Subject: [PATCH] feat: entry separator --- hammerspoon-copyboard.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hammerspoon-copyboard.lua b/hammerspoon-copyboard.lua index d88d8d7..60ea4a5 100644 --- a/hammerspoon-copyboard.lua +++ b/hammerspoon-copyboard.lua @@ -4,6 +4,8 @@ local location = "lalamo.txt" local modifier = {"cmd", "ctrl"} -- The key after the modifiers nescessary to trigger the prompt. local key = "p" +-- The separator used to split entries in the location. +local entry_separator = "%%%" _G.hs = _G.hs or {} @@ -61,7 +63,7 @@ local fuzzySearch = function() return end - local entries = split(content, "%%%", true) + local entries = split(content, entry_separator, true) if #entries == 0 then hs.alert.show("~/" .. location .. " is empty")