From f6c98ec1d6ba49c70d5aedcbbdc0c261155f9bb1 Mon Sep 17 00:00:00 2001 From: "amano.kenji" Date: Tue, 15 Oct 2024 06:52:42 +0000 Subject: [PATCH] feat(hledger-ui): add helix as a supported editor --- hledger-ui/Hledger/UI/Editor.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hledger-ui/Hledger/UI/Editor.hs b/hledger-ui/Hledger/UI/Editor.hs index b4bf40c42..e9e3721a3 100644 --- a/hledger-ui/Hledger/UI/Editor.hs +++ b/hledger-ui/Hledger/UI/Editor.hs @@ -120,6 +120,11 @@ editFileAtPositionCommand mpos f = do Nothing -> [f'] Just ('-' : _, _) -> ["+", f'] Just (l, _) -> ['+' : l, f'] + -- arch linux creates a symlink to /usr/lib/helix/hx at /usr/bin/helix + e | e `elem` ["hx", "helix"] -> case mpos' of + Nothing -> [f'] + Just ('-' : _, _) -> [f'] + Just (l, _) -> ['+' : l, f'] _ -> [f'] return $ unwords $ cmd:args