imp: close: restore legacy flags --closing/--opening/--close-to/--open-from (#2020)

They're cruft, but hidden and low cost and remove one more user hassle.
This commit is contained in:
Simon Michael 2023-04-06 11:05:08 -10:00
parent c151d57069
commit ba0bb5eb4a

View File

@ -43,8 +43,12 @@ closemode = hledgerCommandMode
]
[generalflagsgroup1]
(hiddenflags
-- any old command flags for compatibility, hidden
-- ++ []
++ -- keep supporting old flag names for compatibility
[flagNone ["closing"] (setboolopt "close") "old spelling of --close"
,flagNone ["opening"] (setboolopt "open") "old spelling of --open"
,flagReq ["close-to"] (\s opts -> Right $ setopt "close-acct" s opts) "ACCT" "old spelling of --close-acct"
,flagReq ["open-from"] (\s opts -> Right $ setopt "open-acct" s opts) "ACCT" "old spelling of --open-acct"
]
)
([], Just $ argsFlag "[--close | --open | --migrate | --retain] [ACCTQUERY]")