File tree Expand file tree Collapse file tree 5 files changed +13
-6
lines changed
Expand file tree Collapse file tree 5 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ module Hledger.Cli.Commands.Descriptions (
1818#if !(MIN_VERSION_base(4,11,0))
1919import Data.Monoid
2020#endif
21- import Data.List
21+ import Data.List.Extra (nubSortBy )
22+ import qualified Data.Text.ICU as T
2223import qualified Data.Text.IO as T
2324
2425import Hledger
@@ -39,6 +40,6 @@ descriptions CliOpts{reportopts_=ropts} j = do
3940 d <- getCurrentDay
4041 let q = queryFromOpts d ropts
4142 ts = entriesReport ropts q j
42- descriptions = nub $ sort $ map tdescription ts
43+ descriptions = nubSortBy ( T. compare [ T. CompareIgnoreCase ]) $ map tdescription ts
4344
4445 mapM_ T. putStrLn descriptions
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ module Hledger.Cli.Commands.Notes (
1818#if !(MIN_VERSION_base(4,11,0))
1919import Data.Monoid
2020#endif
21- import Data.List
21+ import Data.List.Extra (nubSortBy )
22+ import qualified Data.Text.ICU as T
2223import qualified Data.Text.IO as T
2324
2425import Hledger
@@ -39,6 +40,6 @@ notes CliOpts{reportopts_=ropts} j = do
3940 d <- getCurrentDay
4041 let q = queryFromOpts d ropts
4142 ts = entriesReport ropts q j
42- notes = nub $ sort $ map transactionNote ts
43+ notes = nubSortBy ( T. compare [ T. CompareIgnoreCase ]) $ map transactionNote ts
4344
4445 mapM_ T. putStrLn notes
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ module Hledger.Cli.Commands.Payees (
1818#if !(MIN_VERSION_base(4,11,0))
1919import Data.Monoid
2020#endif
21- import Data.List
21+ import Data.List.Extra (nubSortBy )
22+ import qualified Data.Text.ICU as T
2223import qualified Data.Text.IO as T
2324
2425import Hledger
@@ -39,6 +40,6 @@ payees CliOpts{reportopts_=ropts} j = do
3940 d <- getCurrentDay
4041 let q = queryFromOpts d ropts
4142 ts = entriesReport ropts q j
42- payees = nub $ sort $ map transactionPayee ts
43+ payees = nubSortBy ( T. compare [ T. CompareIgnoreCase ]) $ map transactionPayee ts
4344
4445 mapM_ T. putStrLn payees
Original file line number Diff line number Diff line change @@ -159,6 +159,7 @@ library
159159 , data-default >= 0.5
160160 , directory
161161 , easytest >= 0.2.1 && < 0.3
162+ , extra
162163 , filepath
163164 , hashable >= 1.2.4
164165 , haskeline >= 0.6
@@ -179,6 +180,7 @@ library
179180 , tabular >= 0.2
180181 , temporary
181182 , text >= 0.11
183+ , text-icu
182184 , time >= 1.5
183185 , timeit
184186 , transformers
Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ dependencies:
119119- Decimal
120120- directory
121121- easytest >= 0.2.1 && <0.3
122+ - extra
122123- filepath
123124- haskeline >=0.6
124125- megaparsec >=7.0.0 && <8
@@ -136,6 +137,7 @@ dependencies:
136137- tabular >=0.2
137138- temporary
138139- text >=0.11
140+ - text-icu
139141- time >=1.5
140142- timeit
141143- transformers
You can’t perform that action at this time.
0 commit comments