From 4b376562b51ee58b27171c3316d2d5ddac108deb Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 5 Mar 2021 14:23:54 +0100 Subject: [PATCH] Fix merge (cherry picked from commit 582aaf615d0a66d0b9c5b567effe209fa4fac1bb) --- src/Options/Applicative/BashCompletion.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Options/Applicative/BashCompletion.hs b/src/Options/Applicative/BashCompletion.hs index 80fcd4f7..eca2553f 100644 --- a/src/Options/Applicative/BashCompletion.hs +++ b/src/Options/Applicative/BashCompletion.hs @@ -125,7 +125,7 @@ bashCompletionQuery pinfo pprefs features ws i _ = case runCompletion compl ppre -- -- For options and flags, ensure that the user -- hasn't disabled them with `--`. - opt_completions :: forall a. ArgPolicy -> ArgumentReachability -> Option a -> IO [String] + opt_completions :: forall a. ArgPolicy -> ArgumentReachability -> Option a -> IO [CompletionItem] opt_completions argPolicy reachability opt = case optMain opt of OptReader ns _ _ | argPolicy /= AllPositionals @@ -134,7 +134,7 @@ bashCompletionQuery pinfo pprefs features ws i _ = case runCompletion compl ppre -> return [] BiOptReader ns _ _ _ | argPolicy /= AllPositionals - -> return . add_opt_help opt $ show_names ns + -> return . fmap legacyCompletionItem . add_opt_help opt $ show_names ns | otherwise -> return [] MapReader _f optr -> opt_completions argPolicy reachability (opt { optMain = optr })