mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-20 20:08:58 +00:00
added a flag to config for setting terminal title
This commit is contained in:
parent
b4fdb5dc36
commit
9239b125b1
@ -287,6 +287,7 @@ impl App {
|
||||
use_custom_assets: !self.matches.get_flag("no-custom-assets"),
|
||||
#[cfg(feature = "lessopen")]
|
||||
use_lessopen: self.matches.get_flag("lessopen"),
|
||||
set_terminal_title: self.matches.get_flag("set_terminal_title"),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -168,6 +168,12 @@ pub fn build_app(interactive_output: bool) -> Command {
|
||||
"Include N lines of context around added/removed/modified lines when using '--diff'.",
|
||||
),
|
||||
)
|
||||
.arg(
|
||||
Arg::new("set_terminal_title")
|
||||
.long("set_terminal_title")
|
||||
.action(ArgAction::SetTrue)
|
||||
.help("Sets terminal title when using a pager")
|
||||
.long_help("Sets terminal title to filenames when using a pager."),)
|
||||
}
|
||||
|
||||
app = app.arg(
|
||||
|
@ -94,6 +94,9 @@ pub struct Config<'a> {
|
||||
// Whether or not to use $LESSOPEN if set
|
||||
#[cfg(feature = "lessopen")]
|
||||
pub use_lessopen: bool,
|
||||
|
||||
// Weather or not to set terminal title when using a pager
|
||||
pub set_terminal_title: bool,
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "minimal-application", feature = "paging"))]
|
||||
|
Loading…
x
Reference in New Issue
Block a user