<commit_before>use strict;
use warnings;

package AngelPS1::Plugin::Term;

our $VERSION = $AngelPS1::VERSION;

use Exporter 5.57 'import';
our @EXPORT = qw(TermTitle);

use AngelPS1::Shell;

use constant {
    TITLE_BEGIN => "\e]0;",
    TITLE_END   => "\a",
};

sub TermTitle
{
    if (AngelPS1::Shell->name eq 'fish') {
        require Carp;
        Carp::carp("TermTitle is not supported on fish. See instead fish_title in the fish manual");
        return
    }
    # TODO use tsl/fsl from terminfo, if the terminfo definition has them
    # TODO Truncate to wsl
    # TODO check eslok and escape if necessary
    AngelPS1::Shell->ps1_invisible(TITLE_BEGIN, @_, TITLE_END)
}

'$';
# vim:set et ts=8 sw=4 sts=4:
<commit_msg>TermTitle: for fish, add an URI to the fish_title doc<commit_after>use strict;
use warnings;

package AngelPS1::Plugin::Term;

our $VERSION = $AngelPS1::VERSION;

use Exporter 5.57 'import';
our @EXPORT = qw(TermTitle);

use AngelPS1::Shell;

use constant {
    TITLE_BEGIN => "\e]0;",
    TITLE_END   => "\a",
};

sub TermTitle
{
    if (AngelPS1::Shell->name eq 'fish') {
        require Carp;
        Carp::carp("TermTitle is not supported on fish. See instead fish_title in the fish manual http://fishshell.com/docs/2.0/index.html#title");
        return
    }
    # TODO use tsl/fsl from terminfo, if the terminfo definition has them
    # TODO Truncate to wsl
    # TODO check eslok and escape if necessary
    AngelPS1::Shell->ps1_invisible(TITLE_BEGIN, @_, TITLE_END)
}

'$';
# vim:set et ts=8 sw=4 sts=4:

{'fraction_non_alphanumeric': 0.1245944192083063, 'fraction_numerical': 0.018170019467878003, 'mean_word_length': 3.4695652173913043, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5257341', 'n_tokens_mistral': 567, 'n_tokens_neox': 542, 'n_words': 160}