mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-03 03:42:26 +01:00
Add helper fn for checking if opened input is theme preview file
This commit is contained in:
@@ -39,6 +39,15 @@ pub(crate) enum OpenedInputKind {
|
||||
CustomReader,
|
||||
}
|
||||
|
||||
impl OpenedInputKind {
|
||||
pub(crate) fn is_theme_preview_file(&self) -> bool {
|
||||
match self {
|
||||
OpenedInputKind::ThemePreviewFile => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) struct OpenedInput<'a> {
|
||||
pub(crate) kind: OpenedInputKind,
|
||||
pub(crate) metadata: InputMetadata,
|
||||
|
Reference in New Issue
Block a user