support ~/... in LEDGER env var

This commit is contained in:
Simon Michael 2007-02-13 04:37:44 +00:00
parent 3c20b0941f
commit 41e83c4688
2 changed files with 3 additions and 6 deletions

View File

@ -29,12 +29,12 @@ getOptions argv =
get_content :: Flag -> Maybe String
get_content (File s) = Just s
--defaultLedgerFile = expand "~/ledger.dat"
defaultLedgerFile = "ledger.dat"
defaultLedgerFile = "~/ledger.dat"
getLedgerFilePath :: IO String
getLedgerFilePath = do
getEnv "LEDGER" `catch` \_ -> return defaultLedgerFile >>= return
defaultpath <- tildeExpand defaultLedgerFile
getEnv "LEDGER" `catch` \_ -> return defaultpath >>= return
-- ledger pattern args are a list of account patterns optionally followed
-- by -- and a list of description patterns

3
TODO
View File

@ -1,6 +1,3 @@
environment
robust ledger file finding
features
register
svn-style truncation