>>>>> Alexis <[email protected]> writes: > * Should ledger really be looking for and use less if PAGER is unset? Isn't > the absence of PAGER and indicator that the user prefers their output > straight to the terminal?
I don’t think it should. If PAGER is not set, it shouldn’t use a pager… > * When looking for less shouldn't ledger search all directories in PATH > instead of hard-coded locations? If yes, does anyone know of a UNIX PATH > searching function readily available, e.g. in the Boost Filesystem Library¹ > before a custom one is added? Yes, searching PATH is The Right Way. > * Where and how is LEDGER_PAGER used in the source code? > A quick grep for LEDGER_PAGER did not > Is there some generic code that allows any ledger command-line option > to be used as an upper-cased and LEDGER_-prefix environment variable? > If yes, where is it implemented? Yes, the code to do so begins here: https://github.com/ledger/ledger/blob/master/src/global.cc#L394 > * How could this be tested along with other unit tests, so that once a > desired behaviour is defined its implementation is tested. You could use a pager that ignores everything and just outputs “I was used”, and then set the test expectation to that value? John -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/m28rcptl1x.fsf%40newartisans.com.
