-
Notifications
You must be signed in to change notification settings - Fork 52
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
unicode hyphen in man page instead of ASCII hyphen-minus #374
Comments
Apparently, groff recently stopped fixing the issue of broken man pages and reverted to original AT&T behaviour and this is the reason why this bug is only now being recognized: |
The scrot manpage gets generated by txt2man. Manually adding Applying some function create-man {
-txt2man -d "$T2M_DATE" -t $T2M_NAME -r $T2M_NAME-$T2M_VERSION -s $T2M_LEVEL -v "$T2M_DESC" $T2M_NAME.txt > $T2M_NAME.$T2M_LEVEL
+txt2man -d "$T2M_DATE" -t $T2M_NAME -r $T2M_NAME-$T2M_VERSION -s $T2M_LEVEL -v "$T2M_DESC" $T2M_NAME.txt | sed 's|-|\\-|g' > $T2M_NAME.$T2M_LEVEL
} This will of course turn every What I'm wondering now is whether this change should be made on our end or if this is something that should be done in Ping: @eribertomota |
Is upstream In any case, I've opened a bug report about this on |
If you copy a flag from the man page, it won't work, as the man page is wrongly formatted and uses Unicode hyphens
‐
(U+2010) instead of the ASCII hyphen-minus-
(U+002D).Step to reproduce bug:
man scrot
in one.‐‐select
in this example.Aftermath:
The man page itself does not have the Unicode character in it, but after comparing it to another man page, I saw that the other man page used the escape character "\" before each "-" and adding some to the scrot man page and opening it with
man -l
did fix the problem.Therefore, here is a hacky way to fix the problem by adding a substitution command to
create-man.sh
:sed -i 's/-/\\-/g' scrot.1
Now, this is not as good as it could be, as it also replace "-" that are non command related, as "scrot-1.10" from the bottom of the page, or
Other man page keep these as the Unicode hyphen, but it is still a lot better than what we got currently. Trying to figure out why my commands did not work took me a long time, when it was a frustrating indistinguishable imposter character.
The text was updated successfully, but these errors were encountered: