cli: drop single-letter aliases, keep the familiar three-letter ones where useful

This commit is contained in:
Simon Michael 2014-04-27 18:46:34 -07:00
parent 4381022e25
commit 7d73ab5264
6 changed files with 11 additions and 10 deletions

View File

@ -27,7 +27,7 @@ import Hledger.Cli.Options
-- | Command line options for this command. -- | Command line options for this command.
accountsmode = (defCommandMode $ ["accounts"] ++ aliases ++ hiddenaliases) { accountsmode = (defCommandMode $ ["accounts"] ++ aliases) {
modeHelp = "show account names" `withAliases` aliases modeHelp = "show account names" `withAliases` aliases
,modeHelpSuffix = [ ,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)." "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] ,groupNamed = [generalflagsgroup1]
} }
} }
where (aliases, hiddenaliases) = (["a"],["acc"]) where aliases = []
-- | The accounts command. -- | The accounts command.
accounts :: CliOpts -> Journal -> IO () accounts :: CliOpts -> Journal -> IO ()

View File

@ -259,7 +259,7 @@ import Hledger.Cli.Options
-- | Command line options for this command. -- | 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 modeHelp = "show accounts and balances" `withAliases` aliases
,modeGroupFlags = C.Group { ,modeGroupFlags = C.Group {
groupUnnamed = [ groupUnnamed = [
@ -276,7 +276,7 @@ balancemode = (defCommandMode $ ["balance"] ++ aliases ++ ["bal"]) { -- also acc
,groupNamed = [generalflagsgroup1] ,groupNamed = [generalflagsgroup1]
} }
} }
where aliases = ["b"] where aliases = ["bal"]
-- | The balance command, prints a balance report. -- | The balance command, prints a balance report.
balance :: CliOpts -> Journal -> IO () balance :: CliOpts -> Journal -> IO ()

View File

@ -20,8 +20,8 @@ import Prelude hiding (putStr)
import Hledger.Utils.UTF8IOCompat (putStr) import Hledger.Utils.UTF8IOCompat (putStr)
activitymode = (defCommandMode ["activity"]) { activitymode = (defCommandMode $ ["activity"] ++ aliases) {
modeHelp = "show a barchart of transactions per interval" modeHelp = "show a barchart of transactions per interval" `withAliases` aliases
,modeHelpSuffix = ["The default interval is daily."] ,modeHelpSuffix = ["The default interval is daily."]
,modeGroupFlags = Group { ,modeGroupFlags = Group {
groupUnnamed = [] groupUnnamed = []
@ -29,6 +29,7 @@ activitymode = (defCommandMode ["activity"]) {
,groupNamed = [generalflagsgroup1] ,groupNamed = [generalflagsgroup1]
} }
} }
where aliases = []
barchar = '*' barchar = '*'

View File

@ -29,7 +29,7 @@ printmode = (defCommandMode $ ["print"] ++ aliases) {
,groupNamed = [generalflagsgroup1] ,groupNamed = [generalflagsgroup1]
} }
} }
where aliases = ["p"] where aliases = []
-- | Print journal transactions in standard format. -- | Print journal transactions in standard format.
print' :: CliOpts -> Journal -> IO () print' :: CliOpts -> Journal -> IO ()

View File

@ -24,7 +24,7 @@ import Hledger.Utils.UTF8IOCompat (putStr)
import Hledger.Cli.Options import Hledger.Cli.Options
registermode = (defCommandMode $ ["register"] ++ aliases ++ ["reg"]) { registermode = (defCommandMode $ ["register"] ++ aliases) {
modeHelp = "show postings and running total" `withAliases` aliases modeHelp = "show postings and running total" `withAliases` aliases
,modeGroupFlags = Group { ,modeGroupFlags = Group {
groupUnnamed = [ groupUnnamed = [
@ -36,7 +36,7 @@ registermode = (defCommandMode $ ["register"] ++ aliases ++ ["reg"]) {
,groupNamed = [generalflagsgroup1] ,groupNamed = [generalflagsgroup1]
} }
} }
where aliases = ["r"] where aliases = ["reg"]
-- | Print a (posting) register report. -- | Print a (posting) register report.
register :: CliOpts -> Journal -> IO () register :: CliOpts -> Journal -> IO ()

View File

@ -32,7 +32,7 @@ statsmode = (defCommandMode $ ["stats"] ++ aliases) {
,groupNamed = [generalflagsgroup1] ,groupNamed = [generalflagsgroup1]
} }
} }
where aliases = ["s"] where aliases = []
-- like Register.summarisePostings -- like Register.summarisePostings
-- | Print various statistics for the journal. -- | Print various statistics for the journal.