Terminal Relaunch
A simple Rust library for detecting terminal capabilities and relaunching programs in better terminals with enhanced feature support, such as RGB ANSI colour and full Unicode rendering support for emojis, etc.
Features
- Terminal Detection: Automatically identifies the current terminal type (Windows Terminal, CMD, VSCode, etc.)
- Feature Detection: Checks for RGB/ANSI color support and full Unicode rendering
- Smart Relaunching: Automatically find an installed and better terminal if available to relaunch your CLI app in.
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Quick Start
use ;
Usage
Detect Current Terminal
use CURRENT_TERMINAL;
println!;
Check Feature Support
use ;
if *SUPPORTS_FULL_UNICODE
if *SUPPORTS_RGB_ANSI_COLOURS
Currently Supported Terminals
Detection
- Windows Terminal, CMD/PowerShell,
- Terminal.app, Generic Third Party MacOS terminal catch-all
- Generic Linux Terminals
Relaunching
- Windows Terminal
License
This project is licensed under the MIT License - see the LICENSE file for details.