src/args.cpp
/////////////////////////
// print all to-do lists
print all to-do lists
print all to - do lists
void printLists()
{
    auto list = listFiles(TodoList::getSaveDir());
    cout << ANSI_BLUE << "to-do lists:\n" << ANSI_RESET;
    cout << "\n";
    unsigned count = 0;
    const unsigned width = getTermWidth();
    for (unsigned i = 0; i < list.size(); i++){
        if (count + list.at(i).length() + 10 >= width){
            count = 0;
            cout << "\n";
        }
        cout << ANSI_GREEN << list.at(i) << "  ";
        count += list.at(i).length() + 2;
    }
    cout << ANSI_RESET << "\n";
}
void printLists ( ) { auto list = listFiles ( TodoList :: getSaveDir ( ) ) ; cout << ANSI_BLUE << " \n " << ANSI_RESET ; cout << " \n " ; unsigned count = 0 ; const unsigned width = getTermWidth ( ) ; for ( unsigned i = 0 ; i < list . size ( ) ; i ++ ) { if ( count + list . at ( i ) . length ( ) + 10 >= width ) { count = 0 ; cout << " \n " ; } cout << ANSI_GREEN << list . at ( i ) << " " ; count += list . at ( i ) . length ( ) + 2 ; } cout << ANSI_RESET << " \n " ; }
print all to-do lists
print all to - do lists