You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the bug?
Following the suggested MANPAGER replacement here
sh -c 'col -bx | bat --language man --plain'
I get an error trying to read some man page
man quota
What happens?
sh: 1: bat: Permission denied
man: command exited with status 127: sed -e '/^[[:space:]]*$/{ N; /^[[:space:]]*\n[[:space:]]*$/D; }' | LESS=-ix8RmPm Manual page quota(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$PM Manual page quota(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=quota(1) sh -c col -bx | bat --language man --plain
Note that if you I do which bat after getting the error then try again man quota then I get the proper man pages through bat. It is as if bash forgot where to find bat 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 of bat.
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
Profile: release
Target triple: x86_64-unknown-linux-gnu
Family: unix
OS: linux
Architecture: x86_64
Pointer width: 64
Endian: little
CPU features: fxsr,sse,sse2
Host: x86_64-unknown-linux-gnu
Less version
> less --version
less 590 (GNU regular expressions)
Copyright (C) 1984-2021 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less
The text was updated successfully, but these errors were encountered:
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
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 heresh -c 'col -bx | bat --language man --plain'
I 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
The text was updated successfully, but these errors were encountered: