1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3
4pub const INVALID_SORT_ORDER: &str = "invalid sort order";
11
12mod box_lines;
13mod buffers;
14pub mod command_inventory;
16pub mod command_parser;
17pub mod command_queue;
18mod dec_modes;
19mod environment;
20pub mod events;
22pub mod formats;
23mod glob;
24mod grid;
25mod hooks;
26mod hyperlinks;
27pub mod identity;
28pub mod input;
30mod keys;
31mod layout;
32mod lifecycle;
33mod options;
34mod pane;
35mod screen;
36mod session;
37pub mod style;
38mod target;
39mod target_find;
40mod terminal;
41mod terminal_passthrough;
42mod terminal_screen;
43mod terminal_sequences;
44pub mod tmux_precedence;
45mod transcript;
46mod utf8;
47mod vis;
48mod window;
49
50pub use box_lines::BoxLines;
51pub use buffers::{BufferStore, BufferView, RenameBufferOutcome, SetBufferOutcome};
52pub use dec_modes::{render_dec_modes, render_dec_modes_for_snapshot};
53pub use environment::{EnvironmentStore, ShowEnvironmentEntry, ENVIRON_HIDDEN};
54pub use formats::format_skip_delimiter;
55pub use grid::{GridRenderOptions, RenderedLineSpan};
56pub use hooks::{
57 hook_explicit_scope_for_target, hook_global_root, hook_natural_scope_for_session_target,
58 hook_natural_scope_for_target, validate_hook_registration, validate_hook_scope,
59 HookBindingView, HookDispatch, HookGlobalRoot, HookScopeIdentity, HookSetOptions, HookStore,
60};
61pub use identity::{PaneId, SessionId, SessionName, WindowId};
62pub use input::{
63 colour_join_rgb, Colour, GridAttr, COLOUR_DEFAULT, COLOUR_FLAG_256, COLOUR_FLAG_RGB,
64 COLOUR_NONE, COLOUR_TERMINAL,
65};
66pub use keys::{
67 key_code_is_mouse_move, key_code_lookup_bits, key_code_to_bytes, key_string_lookup_key,
68 key_string_lookup_string, parse_binding_command_tokens,
69 parse_binding_command_tokens_with_parser, KeyBinding, KeyBindingDisplay, KeyBindingSortOrder,
70 KeyBindingStore, KeyBindingTable, KeyBindingTableRef, KeyCode, KEYC_ANY, KEYC_BSPACE,
71 KEYC_BUILD_MODIFIERS, KEYC_CTRL, KEYC_CURSOR, KEYC_DRAGGING, KEYC_IMPLIED_META, KEYC_KEYPAD,
72 KEYC_LITERAL, KEYC_MASK_FLAGS, KEYC_MASK_KEY, KEYC_MASK_MODIFIERS, KEYC_MASK_TYPE, KEYC_META,
73 KEYC_NONE, KEYC_SENT, KEYC_SHIFT, KEYC_UNKNOWN, KEYC_USER, KEYC_VI, LIST_KEYS_TEMPLATE,
74};
75pub use lifecycle::LifecycleEvent;
76pub use options::{
77 default_global_scope_for_option_name, option_affects_alerts, option_affects_rendering,
78 option_name_by_name, resolve_option_name, resolve_option_name_typed, validate_option_mutation,
79 validate_option_name_mutation, OptionLookupError, OptionMutationOutcome, OptionNotification,
80 OptionStore, ShowOptionsMode,
81};
82pub use pane::{Pane, PaneGeometry};
83pub use screen::{
84 RecoveryRow, RecoveryRowRenderer, Screen, ScreenCellRef, ScreenCellView, ScreenLineView,
85};
86pub use session::{
87 BreakPaneOptions, KillPaneOutcome, PaneJoinOptions, PaneSwapOptions, Session,
88 SessionPaneTarget, SessionRecency, SessionStore,
89};
90pub use style::{
91 colour_to_string, parse_colour, style_parse, style_tostring, ColourParseError, Style,
92 StyleAlign, StyleCell, StyleDefaultType, StyleList, StyleParseError, StyleRange, StyleWidth,
93};
94pub use target_find::{
95 command_target_metadata, CommandTargetMetadata, CommandTargetSpec,
96 MissingCurrentTargetFallback, TargetFindContext, TargetFindFlags, TargetFindType,
97 UnresolvedTarget,
98};
99pub use terminal_passthrough::{
100 TerminalClipboardQuery, TerminalPaletteIndex, TerminalPassthrough, TerminalPassthroughKind,
101};
102pub use terminal_screen::TerminalScreen;
103pub use terminal_sequences::{alternate_screen_enter_sequence, alternate_screen_exit_sequence};
104pub use transcript::{ScreenCaptureRange, Transcript};
105pub use utf8::{text_width, truncate_right_to_width, truncate_to_width, Utf8Config};
106pub use vis::encode_paste_bytes;
107pub use window::{
108 AlertFlags, Window, WindowPaneActivity, WINDOW_ACTIVITY, WINDOW_ALERTFLAGS, WINDOW_BELL,
109 WINDOW_SILENCE, WINLINK_ACTIVITY, WINLINK_ALERTFLAGS, WINLINK_BELL, WINLINK_SILENCE,
110};
111
112#[must_use]
114pub fn fnmatch(pattern: &str, text: &str) -> bool {
115 glob::fnmatch(pattern, text)
116}