What version of bat are you using?
bat 0.15.4
Describe the bug you encountered:
Gives the error: sh: fork: Resource temporarily unavailable instead of showing the file.
Describe what you expected to happen?
I expect to see the file instead of a fork error.
How did you install bat?
nix & home-manager
$ uname -srm
Darwin 19.5.0 x86_64
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.5
BuildVersion: 19F101
$ bat --version
bat 0.15.4
$ env
$ cat /Users/ihsan/.config/bat/config
--pager="sh -c 'col -bx | bat -l man -p'"
--theme="base16"```
$ cat /Users/ihsan/.nix-profile/bin/bat
#! /nix/store/nfd458cwwymmqpy5qb1q7a92zqp7mqsz-bash-4.4-p23/bin/bash -e
export PATH='/nix/store/ywxnqixkk8qkqhjlw7yd278plxfbr0pp-less-551/bin'${PATH:+':'}$PAT
H
exec -a "$0" "/nix/store/lirjhh8mhi4mi4nsc3yhn8pwv5qs72gj-bat-0.15.4/bin/.bat-wrapped"
"$@"
No wrapper function for 'bat'.
No wrapper function for 'cat'.
$ less --version
less 487 (POSIX regular expressions)
I removed this line from my config file and it is working normally now.
--pager="sh -c 'col -bx | bat -l man -p'"
I removed this line from my config file and it is working normally now.
--pager="sh -c 'col -bx | bat -l man -p'"
Yes, this is calling bat recursively otherwise - which leads to the fork error.
Note that we suggest to use this as a value for MANPAGER, not PAGER: https://github.com/sharkdp/bat#man