mirror of
https://github.com/eth-p/bat-extras.git
synced 2025-01-07 13:49:14 +01:00
batwatch: Show the watched command in bat's header
This commit is contained in:
parent
70c7509343
commit
27c68692f1
@ -15,6 +15,7 @@ source "${LIB}/opt_hook_version.sh"
|
|||||||
source "${LIB}/opt_hook_width.sh"
|
source "${LIB}/opt_hook_width.sh"
|
||||||
source "${LIB}/print.sh"
|
source "${LIB}/print.sh"
|
||||||
source "${LIB}/pager.sh"
|
source "${LIB}/pager.sh"
|
||||||
|
source "${LIB}/version.sh"
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Init:
|
# Init:
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
@ -275,6 +276,13 @@ if [[ "$OPT_MODE" = "file" ]]; then
|
|||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
||||||
|
# Set bat's header to show the command.
|
||||||
|
BAT_VERSION="$(bat_version)"
|
||||||
|
if version_compare "$BAT_VERSION" -ge "0.14"; then
|
||||||
|
BAT_ARGS+=(--file-name="${FILES[*]}")
|
||||||
|
fi
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
while true; do
|
while true; do
|
||||||
clear
|
clear
|
||||||
|
Loading…
Reference in New Issue
Block a user