From 4e31ecf2c139455e2d2459ff98f2d4589f7b9dd2 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Thu, 30 Nov 2023 14:39:16 +0100 Subject: chore: make issue ids obligatory --- app/Main.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Main.hs') diff --git a/app/Main.hs b/app/Main.hs index 70ebf5e..737becc 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -376,7 +376,7 @@ import Data.Function ((&)) import Data.List (find, intersperse, isPrefixOf) import Data.List.Extra (list) import Data.Map qualified as M -import Data.Maybe (catMaybes, maybeToList) +import Data.Maybe (maybeToList) import Data.Set qualified as S import Data.Text qualified as T import Data.Text.IO qualified as T @@ -546,7 +546,7 @@ idArg = O.strArgument ( O.metavar "ID" <> O.completer - (O.listIOCompleter $ catMaybes . map I.id . (._3) . last <$> getHistory) + (O.listIOCompleter $ map (T.unpack . I.id) . (._3) . last <$> getHistory) ) editFlag :: O.Parser Bool @@ -662,7 +662,7 @@ main = do Options {colorize, width, command = Show {id, edit}} -> do issues <- (._3) . last <$> getHistory issue <- - case find ((==) (Just id) . I.id) issues of + case find ((==) id . T.unpack . I.id) issues of Nothing -> die (printf "no issue with id `%s'\n" id) Just issue -> pure issue let meta = I.getMeta issues issue -- cgit v1.2.3