From 90c57fb59b3dcc561bd2f38f14384aeeaba8e91d Mon Sep 17 00:00:00 2001 From: Jakub Zika Date: Fri, 20 Feb 2026 17:28:01 +0100 Subject: [PATCH 1/2] fix expand home for commands - when ~ was used in `command` paths in config it wasn't expanded --- CHANGELOG.md | 2 ++ src/eca/features/commands.clj | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d900a61c..3d8aad88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- Fix home (~) expand for command paths in config + ## 0.104.0 - Allow disable chat title generation via `chat title` as `false`. #322 diff --git a/src/eca/features/commands.clj b/src/eca/features/commands.clj index 82f1ec35..3f6d9afe 100644 --- a/src/eca/features/commands.clj +++ b/src/eca/features/commands.clj @@ -57,6 +57,7 @@ (->> (get config :commands) (map (fn [{:keys [path]}] + (let [path (str (fs/expand-home path))] (if (fs/absolute? path) (when (fs/exists? path) {:name (normalize-command-name path) @@ -70,7 +71,7 @@ :path (str (fs/canonicalize f)) :type :user-config :content (slurp f)}))) - roots)))) + roots))))) (flatten) (remove nil?))) From a498f4a0a51b6bb93cd5a7d341f3c78f708b88d3 Mon Sep 17 00:00:00 2001 From: Eric Dallo Date: Thu, 26 Feb 2026 09:25:51 -0300 Subject: [PATCH 2/2] Format --- src/eca/features/commands.clj | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/eca/features/commands.clj b/src/eca/features/commands.clj index 3f6d9afe..ba2437bc 100644 --- a/src/eca/features/commands.clj +++ b/src/eca/features/commands.clj @@ -58,20 +58,20 @@ (map (fn [{:keys [path]}] (let [path (str (fs/expand-home path))] - (if (fs/absolute? path) - (when (fs/exists? path) - {:name (normalize-command-name path) - :path path - :type :user-config - :content (slurp path)}) - (keep (fn [{:keys [uri]}] - (let [f (fs/file (shared/uri->filename uri) path)] - (when (fs/exists? f) - {:name (normalize-command-name f) - :path (str (fs/canonicalize f)) - :type :user-config - :content (slurp f)}))) - roots))))) + (if (fs/absolute? path) + (when (fs/exists? path) + {:name (normalize-command-name path) + :path path + :type :user-config + :content (slurp path)}) + (keep (fn [{:keys [uri]}] + (let [f (fs/file (shared/uri->filename uri) path)] + (when (fs/exists? f) + {:name (normalize-command-name f) + :path (str (fs/canonicalize f)) + :type :user-config + :content (slurp f)}))) + roots))))) (flatten) (remove nil?)))