mirror of
https://github.com/sharkdp/bat.git
synced 2025-04-09 20:28:51 +02:00
terminal title is only set when pager is being used
This commit is contained in:
parent
fd84e4f49f
commit
12b74dfb4e
@ -242,7 +242,9 @@ fn set_terminal_title_to_inputs_names(inputs: &Vec<Input>) {
|
|||||||
fn run_controller(inputs: Vec<Input>, config: &Config, cache_dir: &Path) -> Result<bool> {
|
fn run_controller(inputs: Vec<Input>, config: &Config, cache_dir: &Path) -> Result<bool> {
|
||||||
let assets = assets_from_cache_or_binary(config.use_custom_assets, cache_dir)?;
|
let assets = assets_from_cache_or_binary(config.use_custom_assets, cache_dir)?;
|
||||||
let controller = Controller::new(config, &assets);
|
let controller = Controller::new(config, &assets);
|
||||||
|
if config.paging_mode != PagingMode::Never {
|
||||||
set_terminal_title_to_inputs_names(&inputs);
|
set_terminal_title_to_inputs_names(&inputs);
|
||||||
|
}
|
||||||
controller.run(inputs, None)
|
controller.run(inputs, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user