Merge commit '61156c861818642fb624932af3c7c7b63b14a5b3' into next

This commit is contained in:
Craig Earls 2015-04-30 22:07:27 -07:00
commit 5f03a94b52
4 changed files with 11 additions and 7 deletions

View file

@ -960,7 +960,7 @@ Often set in one's
file to change the default.
.It Fl \-unrealized-losses
Allow the user to specify what account name should be used for
unrealized gains. Defaults to
unrealized losses. Defaults to
.Sy "Equity:Unrealized Losses" .
Often set in one's
.Pa ~/.ledgerrc

View file

@ -6752,7 +6752,7 @@ Often set in one's @file{~/.ledgerrc} file to change the default.
@item --unrealized-losses @var{STR}
Allow the user to specify what account name should be used for
unrealized gains. Defaults to @samp{"Equity:Unrealized Losses"}.
unrealized losses. Defaults to @samp{"Equity:Unrealized Losses"}.
Often set in one's @file{~/.ledgerrc} file to change the default.
@item --unround

View file

@ -110,7 +110,7 @@ global_scope_t::~global_scope_t()
void global_scope_t::parse_init(path init_file)
{
TRACE_START(init, 1, "Read initialization file");
parse_context_stack_t parsing_context;
parsing_context.push(init_file);
parsing_context.get_current().journal = session().journal.get();
@ -122,13 +122,13 @@ void global_scope_t::parse_init(path init_file)
throw_(parse_error, _f("Transactions found in initialization file '%1%'")
% init_file);
}
TRACE_FINISH(init, 1);
}
void global_scope_t::read_init()
{
// if specified on the command line init_file_ is filled in
// if specified on the command line init_file_ is filled in
// global_scope_t::handle_debug_options. If it was specified on the command line
// fail if the file doesn't exist. If no init file was specified
// on the command-line then try the default values, but don't fail if there
@ -144,6 +144,9 @@ void global_scope_t::read_init()
} else {
if (const char * home_var = std::getenv("HOME")) {
init_file = (path(home_var) / ".ledgerrc");
if (! exists(init_file)) {
init_file = ("./.ledgerrc");
}
} else {
init_file = ("./.ledgerrc");
}
@ -499,7 +502,7 @@ void handle_debug_options(int argc, char * argv[])
}
else if (i + 1 < argc && std::strcmp(argv[i], "--debug") == 0) {
#if DEBUG_ON
_log_level = LOG_DEBUG;
_log_level = LOG_DEBUG;
_log_category = argv[i + 1];
i++;
#endif

View file

@ -26,17 +26,18 @@ class CheckBaselineTests (CheckOptions):
'file',
'force-color',
'force-pager',
'generated',
'help',
'import',
'no-color',
'no-pager',
'options',
'price-exp',
'revalued-total',
'seed',
'trace',
'verbose',
'verify',
'verify-memory',
'version'
]