Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

man(1): use gzcat for .gz files #789

Closed
wants to merge 1 commit into from

Conversation

mohd-akram
Copy link
Contributor

POSIX zcat appends the .Z suffix to file arguments causing the command to fail with .gz files.

POSIX zcat appends the .Z suffix to file arguments causing the command to fail
with .gz files.

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
@markjdb
Copy link
Member

markjdb commented Jul 4, 2023

I believe this change has no effect on FreeBSD, since our zcat(1) is apparently not compliant and doesn't have the behaviour of appending .Z to paths specified in its arguments. Though, our gzcat(1) does indeed append ".gz" if an attempt to open a file returns ENOENT. Probably it's a bug that it doesn't try ".Z" when invoked as zcat.

@markjdb
Copy link
Member

markjdb commented Jul 4, 2023

Landed in main, thanks.

@markjdb markjdb closed this Jul 4, 2023
@mohd-akram mohd-akram deleted the man-gzip branch July 4, 2023 19:45
freebsd-git pushed a commit that referenced this pull request Jul 18, 2023
POSIX zcat appends the .Z suffix to file arguments causing the command to fail
with .gz files.

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>

Reviewed by:	markj
MFC after:	2 weeks
Pull Request:	#789

(cherry picked from commit b35ea9b)
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Sep 2, 2023
POSIX zcat appends the .Z suffix to file arguments causing the command to fail
with .gz files.

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>

Reviewed by:	markj
MFC after:	2 weeks
Pull Request:	freebsd/freebsd-src#789
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants