Merge remote-tracking branch 'origin/master' into query

This commit is contained in:
Mats Rauhala 2021-01-03 00:43:39 +02:00
commit a921139295

View File

@ -14,6 +14,9 @@ import UnliftIO.Directory
import Data.Foldable
(asum)
import System.Environment
(lookupEnv)
import qualified Operations
import Data.Query
@ -35,5 +38,8 @@ commands = subparser
main :: IO ()
main = do
env <- Environment <$> getXdgDirectory XdgData "buuka"
execParser (info (commands <**> helper) fullDesc) >>= runBuukaM env
env <- Environment <$> (lookupEnv "BUUKA_HOME" >>= maybe defaultHome pure)
execParser (info (commands <**> helper) (fullDesc <> progDesc description)) >>= runBuukaM env
where
defaultHome = getXdgDirectory XdgData "buuka"
description = "Bookmarks manager. Stores the bookmarks in a yaml file under your xdg directory or in a folder specified by the BUUKA_HOME environment variable"