From 7d73ab5264eb8e8c8a8c9cb67aca0449fa92b924 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 27 Apr 2014 18:46:34 -0700 Subject: [PATCH] cli: drop single-letter aliases, keep the familiar three-letter ones where useful --- hledger/Hledger/Cli/Accounts.hs | 4 ++-- hledger/Hledger/Cli/Balance.hs | 4 ++-- hledger/Hledger/Cli/Histogram.hs | 5 +++-- hledger/Hledger/Cli/Print.hs | 2 +- hledger/Hledger/Cli/Register.hs | 4 ++-- hledger/Hledger/Cli/Stats.hs | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hledger/Hledger/Cli/Accounts.hs b/hledger/Hledger/Cli/Accounts.hs index 82b3058f9..6a252171b 100644 --- a/hledger/Hledger/Cli/Accounts.hs +++ b/hledger/Hledger/Cli/Accounts.hs @@ -27,7 +27,7 @@ import Hledger.Cli.Options -- | Command line options for this command. -accountsmode = (defCommandMode $ ["accounts"] ++ aliases ++ hiddenaliases) { +accountsmode = (defCommandMode $ ["accounts"] ++ aliases) { modeHelp = "show account names" `withAliases` aliases ,modeHelpSuffix = [ "This command lists the accounts referenced by matched postings (and in tree mode, their parents as well). The accounts can be depth-clipped (--depth N or depth:N) or have their leading components dropped (--drop N)." @@ -42,7 +42,7 @@ accountsmode = (defCommandMode $ ["accounts"] ++ aliases ++ hiddenaliases) { ,groupNamed = [generalflagsgroup1] } } - where (aliases, hiddenaliases) = (["a"],["acc"]) + where aliases = [] -- | The accounts command. accounts :: CliOpts -> Journal -> IO () diff --git a/hledger/Hledger/Cli/Balance.hs b/hledger/Hledger/Cli/Balance.hs index 9333823ac..65465c3b7 100644 --- a/hledger/Hledger/Cli/Balance.hs +++ b/hledger/Hledger/Cli/Balance.hs @@ -259,7 +259,7 @@ import Hledger.Cli.Options -- | Command line options for this command. -balancemode = (defCommandMode $ ["balance"] ++ aliases ++ ["bal"]) { -- also accept but don't show the common bal alias +balancemode = (defCommandMode $ ["balance"] ++ aliases) { -- also accept but don't show the common bal alias modeHelp = "show accounts and balances" `withAliases` aliases ,modeGroupFlags = C.Group { groupUnnamed = [ @@ -276,7 +276,7 @@ balancemode = (defCommandMode $ ["balance"] ++ aliases ++ ["bal"]) { -- also acc ,groupNamed = [generalflagsgroup1] } } - where aliases = ["b"] + where aliases = ["bal"] -- | The balance command, prints a balance report. balance :: CliOpts -> Journal -> IO () diff --git a/hledger/Hledger/Cli/Histogram.hs b/hledger/Hledger/Cli/Histogram.hs index b7efce478..aaa63cf0b 100644 --- a/hledger/Hledger/Cli/Histogram.hs +++ b/hledger/Hledger/Cli/Histogram.hs @@ -20,8 +20,8 @@ import Prelude hiding (putStr) import Hledger.Utils.UTF8IOCompat (putStr) -activitymode = (defCommandMode ["activity"]) { - modeHelp = "show a barchart of transactions per interval" +activitymode = (defCommandMode $ ["activity"] ++ aliases) { + modeHelp = "show a barchart of transactions per interval" `withAliases` aliases ,modeHelpSuffix = ["The default interval is daily."] ,modeGroupFlags = Group { groupUnnamed = [] @@ -29,6 +29,7 @@ activitymode = (defCommandMode ["activity"]) { ,groupNamed = [generalflagsgroup1] } } + where aliases = [] barchar = '*' diff --git a/hledger/Hledger/Cli/Print.hs b/hledger/Hledger/Cli/Print.hs index 948b31b1c..cd240c44a 100644 --- a/hledger/Hledger/Cli/Print.hs +++ b/hledger/Hledger/Cli/Print.hs @@ -29,7 +29,7 @@ printmode = (defCommandMode $ ["print"] ++ aliases) { ,groupNamed = [generalflagsgroup1] } } - where aliases = ["p"] + where aliases = [] -- | Print journal transactions in standard format. print' :: CliOpts -> Journal -> IO () diff --git a/hledger/Hledger/Cli/Register.hs b/hledger/Hledger/Cli/Register.hs index f623235ae..12ada222f 100644 --- a/hledger/Hledger/Cli/Register.hs +++ b/hledger/Hledger/Cli/Register.hs @@ -24,7 +24,7 @@ import Hledger.Utils.UTF8IOCompat (putStr) import Hledger.Cli.Options -registermode = (defCommandMode $ ["register"] ++ aliases ++ ["reg"]) { +registermode = (defCommandMode $ ["register"] ++ aliases) { modeHelp = "show postings and running total" `withAliases` aliases ,modeGroupFlags = Group { groupUnnamed = [ @@ -36,7 +36,7 @@ registermode = (defCommandMode $ ["register"] ++ aliases ++ ["reg"]) { ,groupNamed = [generalflagsgroup1] } } - where aliases = ["r"] + where aliases = ["reg"] -- | Print a (posting) register report. register :: CliOpts -> Journal -> IO () diff --git a/hledger/Hledger/Cli/Stats.hs b/hledger/Hledger/Cli/Stats.hs index 4c274bc92..7f523fcfc 100644 --- a/hledger/Hledger/Cli/Stats.hs +++ b/hledger/Hledger/Cli/Stats.hs @@ -32,7 +32,7 @@ statsmode = (defCommandMode $ ["stats"] ++ aliases) { ,groupNamed = [generalflagsgroup1] } } - where aliases = ["s"] + where aliases = [] -- like Register.summarisePostings -- | Print various statistics for the journal.