hledger-1.12.1: Command-line interface for the hledger accounting tool

Safe Haskell | None
Language | Haskell2010

Hledger.Cli.Commands

Description

hledger's built-in commands, and helpers for printing the commands list.

Synopsis

- findCommand :: String -> Maybe (Mode RawOpts, CliOpts -> Journal -> IO ())
- testcmd :: CliOpts -> Journal -> IO ()
- builtinCommands :: [(Mode RawOpts, CliOpts -> Journal -> IO ())]
- builtinCommandNames :: [String]
- printCommandsList :: [String] -> IO ()
- tests_Commands :: Test ()
- module Hledger.Cli.Commands.Accounts
- module Hledger.Cli.Commands.Activity
- module Hledger.Cli.Commands.Add
- module Hledger.Cli.Commands.Balance
- module Hledger.Cli.Commands.Balancesheet
- module Hledger.Cli.Commands.Balancesheetequity
- module Hledger.Cli.Commands.Cashflow
- module Hledger.Cli.Commands.Checkdates
- module Hledger.Cli.Commands.Checkdupes
- module Hledger.Cli.Commands.Close
- module Hledger.Cli.Commands.Help
- module Hledger.Cli.Commands.Import
- module Hledger.Cli.Commands.Incomestatement
- module Hledger.Cli.Commands.Prices
- module Hledger.Cli.Commands.Print
- module Hledger.Cli.Commands.Printunique
- module Hledger.Cli.Commands.Register
- module Hledger.Cli.Commands.Registermatch
- module Hledger.Cli.Commands.Rewrite
- module Hledger.Cli.Commands.Stats
- module Hledger.Cli.Commands.Tags

# Documentation

findCommand :: String -> Maybe (Mode RawOpts, CliOpts -> Journal -> IO ()) Source #

Look up a builtin command's mode and action by exact command name or alias.

testcmd :: CliOpts -> Journal -> IO () Source #

See testmode.

Unlike other hledger commands, this one does not operate on the user's Journal. For ease of implementation the Journal parameter remains in the type signature.

builtinCommands :: [(Mode RawOpts, CliOpts -> Journal -> IO ())] Source #

The cmdargs subcommand mode and IO action for each builtin command. Command actions take parsed CLI options and a (lazy) finalised journal.

builtinCommandNames :: [String] Source #

All names and aliases of builtin commands.

printCommandsList :: [String] -> IO () Source #

Print the commands list, modifying the template above based on the currently available addons. Missing addons will be removed, and extra addons will be added under Misc.

tests_Commands :: Test () Source #

module Hledger.Cli.Commands.Accounts

module Hledger.Cli.Commands.Activity

module Hledger.Cli.Commands.Add

module Hledger.Cli.Commands.Balance

module Hledger.Cli.Commands.Balancesheet

module Hledger.Cli.Commands.Balancesheetequity

module Hledger.Cli.Commands.Cashflow

module Hledger.Cli.Commands.Checkdates

module Hledger.Cli.Commands.Checkdupes

module Hledger.Cli.Commands.Close

module Hledger.Cli.Commands.Help

module Hledger.Cli.Commands.Import

module Hledger.Cli.Commands.Incomestatement

module Hledger.Cli.Commands.Prices

module Hledger.Cli.Commands.Print

module Hledger.Cli.Commands.Printunique

module Hledger.Cli.Commands.Register

module Hledger.Cli.Commands.Registermatch

module Hledger.Cli.Commands.Rewrite

module Hledger.Cli.Commands.Stats

module Hledger.Cli.Commands.Tags