| 689 | } |
| 690 | |
| 691 | void UIConsole::cmdGrep( const std::vector<String>& params ) { |
| 692 | if ( params.empty() ) |
| 693 | return; |
| 694 | bool caseSensitive = !std::any_of( params.begin(), params.end(), |
| 695 | []( const auto& other ) { return "-i" == other; } ); |
| 696 | String search = params[params.size() - 1]; |
| 697 | |
| 698 | if ( caseSensitive ) { |
| 699 | for ( const auto& cmd : mCmdLog ) |
| 700 | if ( !cmd.log.empty() && cmd.log[0] != '>' && String::contains( cmd.log, search ) ) |
| 701 | privPushText( String( cmd.log ) ); |
| 702 | } else { |
| 703 | search.toLower(); |
| 704 | for ( const auto& cmd : mCmdLog ) |
| 705 | if ( !cmd.log.empty() && cmd.log[0] != '>' && |
| 706 | String::contains( String::toLower( cmd.log ), search ) ) |
| 707 | privPushText( String( cmd.log ) ); |
| 708 | } |
| 709 | } |
| 710 | |
| 711 | void UIConsole::cmdSetGamma( const std::vector<String>& params ) { |
| 712 | if ( params.size() >= 2 ) { |