Open SamuelLarkin opened 2 months ago
Are you able to use bat
outside the context of a MANPAGER
or do you get the same permission denied error initially?
Maybe worth putting the full path to bat
in your MANPAGER
instead of just the executable name to see if it solves the issue
It happened again.
man nvidia-smi
sh: 1: bat: Permission denied
man: command exited with status 127: sed -e '/^[[:space:]]*$/{ N; /^[[:space:]]*\n[[:space:]]*$/D; }' | LESS=-ix8RmPm Manual page nvidia-smi(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$PM Manual page nvidia-smi(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$--no-init --QUIET --RAW-CONTROL-CHARS --chop-long-lines --ignore-case --search-skip-screen --use-color --color=Sky MAN_PN=nvidia-smi(1) sh -c col -bx | bat --language man --plain
I then immediately did bat <A_FILE>
after getting the error and got the desired out aka the file's content.
Then without doing which bat
, I did man nvidia-smi
worked as expected.
I'll try changing export MANPAGER="sh -c 'col -bx | bat --language man --plain'"
to export MANPAGER="sh -c 'col -bx | ~/.local/bin/bat --language man --plain'"
to see if I get the error.
What steps will reproduce the bug? Following the suggested
MANPAGER
replacement hereI get an error trying to read some man page
What happens?
Note that if you I do
which bat
after getting the error then try againman quota
then I get the proper man pages throughbat
. It is as ifbash
forgot where to findbat
but once I refresh its memory, it works.What did you expect to happen instead?
To see the man pages for
quota
through the eye ofbat
.How did you install
bat
?cargo install --force bat
bat version and environment
Software version
bat 0.23.0
Operating system
Linux 5.15.0-119-generic
Command-line
Environment variables
System Config file
Could not read contents of '/etc/bat/config': No such file or directory (os error 2).
Config file
Could not read contents of '$HOME/.config/bat/config': No such file or directory (os error 2).
Custom assets metadata
Could not read contents of '$HOME/.cache/bat/metadata.yaml': No such file or directory (os error 2).
Custom assets
'$HOME/.cache/bat' not found
Compile time information
Less version