Term::Title - Portable API to set the terminal titlebar


Term-Title documentation  | view source Contained in the Term-Title distribution.

Index


NAME

Top

Term::Title - Portable API to set the terminal titlebar

VERSION

Top

This documentation describes version 0.03.

SYNOPSIS

Top

     use Term::Title 'set_titlebar';

     set_titlebar("This goes into the title");

     set_titlebar("Title", "And also print this to the terminal");

DESCRIPTION

Top

Term::Title provides an abstraction for setting the titlebar (or title tab) across different types of terminals. For *nix terminals, it prints the appropriate escape sequences to set the terminal title based on the value of $ENV{TERM}. On Windows, it uses Win32::Console to set the title directly.

Currently, supported terminals include:

USAGE

Top

set_titlebar()

     set_titlebar( $title, @optional_text );

Sets the titlebar to $title or clears the titlebar if $title is undefined.

On terminals that require printing escape codes to the terminal, a newline character is also printed to the terminal. If @optional_text is given, it will be printed to the terminal prior to the newline. Thus, to keep terminal output cleaner, use set_titlebar() in place of a print() statement to set the titlebar and print at the same time.

If the terminal is not supported, set_titlebar silently continues, printing @optional_text if any.

BUGS

Top

Please report any bugs or feature using the CPAN Request Tracker. Bugs can be submitted through the web interface at http://rt.cpan.org/Dist/Display.html?Queue=Term-Title

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

Top

AUTHOR

Top

David A. Golden (DAGOLDEN)

COPYRIGHT AND LICENSE

Top


Term-Title documentation  | view source Contained in the Term-Title distribution.