mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-28 04:03:39 +08:00
77aeb6a2a8
Drop support for history file version 1. ParseExecutionContext no longer contains an OperationContext because in my first implementation, ParseExecutionContext didn't have interior mutability. We should probably try to add it back. Add a few to-do style comments. Search for "todo!" and "PORTING". Co-authored-by: Xiretza <xiretza@xiretza.xyz> (complete, wildcard, expand, history, history/file) Co-authored-by: Henrik Hørlück Berg <36937807+henrikhorluck@users.noreply.github.com> (builtins/set)
38 lines
989 B
C++
Executable File
38 lines
989 B
C++
Executable File
// Generic output functions.
|
|
//
|
|
// Constants for various character classifications. Each character of a command string can be
|
|
// classified as one of the following types.
|
|
#ifndef FISH_OUTPUT_H
|
|
#define FISH_OUTPUT_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "color.h"
|
|
|
|
#if INCLUDE_RUST_HEADERS
|
|
#include "output.rs.h"
|
|
#else
|
|
// Hacks to allow us to compile without Rust headers.
|
|
struct outputter_t;
|
|
#endif
|
|
|
|
#include "env.h"
|
|
|
|
rgb_color_t parse_color(const env_var_t &var, bool is_background);
|
|
|
|
/// Sets what colors are supported.
|
|
enum { color_support_term256 = 1 << 0, color_support_term24bit = 1 << 1 };
|
|
using color_support_t = uint8_t;
|
|
extern "C" {
|
|
color_support_t output_get_color_support();
|
|
void output_set_color_support(color_support_t val);
|
|
}
|
|
|
|
rgb_color_t best_color(const std::vector<rgb_color_t> &candidates, color_support_t support);
|
|
|
|
// Temporary to support builtin set_color.
|
|
void writembs_nofail(outputter_t &outp, const char *str);
|
|
void writembs(outputter_t &outp, const char *str);
|
|
|
|
#endif
|