- SEE ALSO
- COPYRIGHT AND LICENSE
sshwrap-hostcolor - SSH wrapper script to remember the terminal background you use for each host
This document describes version 0.006 of sshwrap-hostcolor (from Perl distribution App-sshwrap-hostcolor), released on 2018-10-10.
Use like you would ssh:
% sshwrap-hostcolor -v firstname.lastname@example.org
For convenience, alias this script to ssh. In your Unix shell:
then you can use it like this:
% ssh -v email@example.com
After you ssh to the remote host, change the background color of your terminal (e.g. to dark blue). Upon exit, the script will retrieve the terminal's current background color and record this line to ~/.sshwrap-hostcolor.history:
Next time you ssh to the same
user@host combination, the script will set the terminal's background color to dark blue.
As a bonus, you can also activate the completion script _sshwrap-hostcolor:
complete -C _sshwrap-hostcolor ssh
this will let you complete
user@host and immediately change the background color to the remembered one.
And as another bonus, if you set
random-light), the script will automatically assign a random color for each unrecognized user+host.
To get and set terminal background color programmatically, an xterm-compatible terminal is required. Please see the list here: XTerm::Util.
String. Can be set to
random-dark to automatically set the color of a new user+host with a random color between "000000" and "3f3f3f". Can be set to
random-light to automatically set the color of a new user+host with a random color between "c0c0c0" and "ffffff".
Please visit the project's homepage at https://metacpan.org/release/App-sshwrap-hostcolor.
Source repository is at https://github.com/perlancar/perl-App-sshwrap-hostcolor.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-sshwrap-hostcolor
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.
This software is copyright (c) 2018 by firstname.lastname@example.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.