Closed PeterWhittaker closed 9 months ago
Thank you for reporting. It looks like a lot of the XDG strings are broken. Would you like to open a PR to fix them? A quick oneliner could be:
$ sed -i -e 's/XDG_\\RUNTIME\\_DIR/XDG_RUNTIME_DIR/' docs/*.md
That leaves one XDG unfixed (in buildah-from), but that's easy to fix by hand. And there's the broken BUILDAH_FORMAT in buildah-commit, also fixable by hand.
A quick oneliner to find them all is:
$ for i in docs/*\.[1-9];do x=$(man -l $i | grep '\\');if [[ -n "$x" ]]; then printf "\n%s\n%s\n" "$i" "$x";fi;done
Once that comes up empty, profit! I mean, do some manual double-checking, and submit a PR! (If you'd like to).
Thanks again.
My first cut was to do a very similar sed
script, but then I noticed a few other stray \
, hence the issue. For example, if you run git grep '\\' docs/*.md
, you'll see an awful lot, e.g., in buildah\-rm
in buildah-rm.1.md
, BUILD\_REGISTRY\_SOURCES
in buildah-build.1.md
. They all look like attempts to escape -
and _
, neither of which are necessary AFAICT.
But only AFAICT. Hence the issue. :->
I'm quite happy to fix only the various XDG_RUNTIME_DIR
ones, and leave the others, since they appear to be harmless, but I wanted to confirm that as a direction.
As I see it, there are three alternatives:
XDG_RUNTIME_DIR
and leave the others.XDG_RUNTIME_DIR
and open an issue re the others (I doubt I'll get to those); that will be work for someone else somewhere down the line.I think that 1 or 2 are the reasonable ones right now (given I don't have time for 3).
Let me know your preference, and, if it's 1 or 2, I'll get it done soon.
(While we are here: I've noticed that some of the md
files, e.g. buildah-build
, have odd formatting that causes the text of the note to not reflow properly. E.g., man buildah-build
in a wide terminal with COLUMN_WIDTH set to 72 (alias man='MANWIDTH=$((COLUMNS > 72 ? 72 : COLUMNS)) man'
will do it): The note re not combining O and Z will not be wrapped at 72 because the troff code is .nf
. I have no idea how to fix this one. Do you want to handle in herein, or open a separate issue for it?)
I'm not seeing a strong reason to fix all backslashes: that would make a bigger PR, harder to review, harder to confirm in all cases (some of the backslashes are--or were thought to be--necessary to avoid italicizing the HTML results). Focusing on the clearly-bad *roff output is a nice smaller step, with an easily-seen good result (no confusing backslashes in user-visible man pages). So, a definite 1 for me!
Wrap: oof. Another nice catch, thank you for reporting that. I see the problem, and it shouldn't be hard to fix but it'll be tedious. If you don't mind opening an issue and tagging me, I would appreciate that very much.
A friendly reminder that this issue had no activity for 30 days.
@PeterWhittaker Still working on the PR?
@PeterWhittaker Still working on the PR?
@rhatdan Planning on getting back to it, hopefully early October. Work then life went redline....
A friendly reminder that this issue had no activity for 30 days.
@PeterWhittaker reminder
A friendly reminder that this issue had no activity for 30 days.
@PeterWhittaker Friendly ping
NOTE FROM AUTHOR I'm opening this to get guidance re how best to tackle this. This seems to be a common problem, but in some cases the apparently extraneous backslashes are ignored by
troff
, while in other cases they are displayed to the user. I'm quite happy to craft ased
script to fix the problem, but I don't want to introduce new problems, so I'm seeking guidance as to why these extra backslashes are there (escaping troff codes, perhaps?) and how best to tackle this.Thoughts?
@edsantiago Tagging you as an active user who might know best whom to ping. Thanks!
Description
Several of the man page files contain unnecessary backslashes that are displayed when the page is output via
man
. Cf, for example, the output of the following command run in thedocs
folder:Steps to reproduce the issue:
man builds-build
/RUNTIME
--authfile
, there is a baskslash in front of the first instance of RUN:...Default is ${XDG_\RUN...
Describe the results you received:
Cf above.
Describe the results you expected:
No extraneous backslashes
Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
:Output of
podman version
if reporting apodman build
issue:*Output of `cat /etc/release`:**
Output of
uname -a
:Output of
cat /etc/containers/storage.conf
: