mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-20 06:13:47 +08:00
c409b1a89c
Either add rust wrappers for C++ functions called via ffi or port some pure code from C++ to rust to provide support for the upcoming `env_dispatch` rewrite.
20 lines
389 B
Rust
20 lines
389 B
Rust
use bitflags::bitflags;
|
|
|
|
bitflags! {
|
|
pub struct ColorSupport: u8 {
|
|
const NONE = 0;
|
|
const TERM_256COLOR = 1<<0;
|
|
const TERM_24BIT = 1<<1;
|
|
}
|
|
}
|
|
|
|
pub fn output_set_color_support(value: ColorSupport) {
|
|
extern "C" {
|
|
pub fn output_set_color_support(value: libc::c_int);
|
|
}
|
|
|
|
unsafe {
|
|
output_set_color_support(value.bits() as i32);
|
|
}
|
|
}
|