Is there a  format command like %/ that can be executed outside a string?
I have the following in a bash script:

--format "%(ansify_if(
             justify(depth_spacer + partial_account(options.flat), 18, 0,
false, color) +
             justify(scrub(get_at(total_expr, 0)), 16, 16 + prepend_width,
true, color) +
             justify(scrub(get_at(total_expr, 1)), 18, 36 + prepend_width,
true, color) + '  ' +
             (latest_cleared ? format_date(latest_cleared) : \"         \"),
                  ( get_at(total_expr, 1)  ==  get_at( total_expr, 0)) ?
green : yellow ) )
%/                      ------------      ------------
%34(get_at(display_total, 0)) %17(get_at(display_total, 1))"

For code readability I would like to be able to indent the last lines
appropriately, but I can't find a way to do the last line separator inside
a parenthetical clause, is there a command that mimics the %/   ?

I would like to be able to write:

--format "%((ansify_if(
             justify(depth_spacer + partial_account(options.flat), 18, 0,
false, color) +
             justify(scrub(get_at(total_expr, 0)), 16, 16 + prepend_width,
true, color) +
             justify(scrub(get_at(total_expr, 1)), 18, 36 + prepend_width,
true, color) + '  ' +
             (latest_cleared ? format_date(latest_cleared) : \"         \"),
                          ( get_at(total_expr, 1)  ==  get_at( total_expr,
0)) ? green : yellow ) ) + '\n'
             NEXT_TO_LAST_COMMAND('                      ------------
------------') +
             justify(get_at(display_total, 0), 34, 0, true ) +
             justify(get_at(display_total, 1), 17, 0, true ))"

I may just switch to scripting everything in python with prettier string
handling capabilities, but I thought I would ask about a command
replacement for %/

As an aside, since I have been going though John's source code in great
detail I have determined that ledger 4.5 will be roughly equivalent to
Oracle 6...
--
Craig, Corona De Tucson, AZ
enderw88.wordpress.com

Reply via email to