diff options
author | Alexander Foremny <aforemny@posteo.de> | 2023-11-30 14:39:16 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2023-11-30 14:40:13 +0100 |
commit | 4e31ecf2c139455e2d2459ff98f2d4589f7b9dd2 (patch) | |
tree | 9ea519319dd58fb419dc833088cd9217beb121c9 /app/Main.hs | |
parent | f82d2c4be5965ae8b4b7dea1d2a00cf8a1f92954 (diff) |
chore: make issue ids obligatory
Diffstat (limited to 'app/Main.hs')
-rw-r--r-- | app/Main.hs | 6 |
1 files changed, 3 insertions, 3 deletions
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 |