1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-04 20:32:27 +01:00

Throws an error when bat is being user as pager.

As mentioned on #1334 `bat` should not be used as a value for `pager`,
this change checks both the balue of `bat` provided as a parameter or
as an environment variable.
This commit is contained in:
Adrian Rivera
2020-10-25 02:13:57 -07:00
committed by David Peter
parent 072fb380d8
commit 9837948c3a
3 changed files with 16 additions and 2 deletions

View File

@@ -20,6 +20,10 @@ error_chain! {
description("unknown syntax"),
display("unknown syntax: '{}'", name)
}
InvalidPagerValueBat {
description("invalid value `bat` for pager property"),
display("Use of bat as a pager is disallowed in order to avoid infinite recursion problems")
}
}
}