Пример #1
0
function pake_format_action($section, $text, $size = null)
{
    if (DIRECTORY_SEPARATOR != '\\' and (!function_exists('posix_isatty') or posix_isatty(STDOUT))) {
        $text = pake_excerpt($text, $size);
    } else {
        // windows or pipes
    }
    $width = 9 + strlen(pakeColor::colorize('', 'INFO'));
    return sprintf('>> %-' . $width . 's %s', pakeColor::colorize($section, 'INFO'), $text);
}
Пример #2
0
function pake_format_action($section, $text, $size = null)
{
    $longest_action = 12;
    // 'svn checkout'
    if (pakeApp::get_instance()->shouldDoExcerpts()) {
        $offset = $longest_action + 4;
        // + '>> ' + ' '
        $text = pake_excerpt($text, $size, $offset);
    }
    $width = $longest_action + mb_strlen(pakeColor::colorize('', 'INFO'));
    return pake_sprintf('>> %-' . $width . 's %s', pakeColor::colorize($section, 'INFO'), $text);
}