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

curl.1: Problem with '-' #6698

alejandro-colomar opened this issue Mar 6, 2021 · 9 comments

curl.1: Problem with '-' #6698

alejandro-colomar opened this issue Mar 6, 2021 · 9 comments


Copy link

alejandro-colomar commented Mar 6, 2021

Where's the source code for curl.1? I was trying to fix this myself, but I couldn't find it.

The '-' symbol is not being used correctly (you should use '-', which I guess you're not using). How it matters to me: I was searching for option '-s' in the manual page, for which I simply typed '/ -s' in the pager, and to my surprise it didn't show anything; the rendered '-' character is a different character from the one I'm typing, so it doesn't find it. A simple '/-' search only showed 2 appearances, which is weird.

See also:

$ man 7 man-pages | sed -n '/Generating optimal glyphs/,+32p'
   Generating optimal glyphs
       Where a real minus character is required (e.g., for numbers such  as  -1,  for  man
       page cross references such as utf-8(7), or when writing options that have a leading
       dash, such as in ls -l), use the following form in the man page source:


       This guideline applies also to code examples.

       The use of real minus signs serves the following purposes:

       *  To provide better renderings on various targets other than ASCII terminals,  no‐
          tably in PDF and on Unicode/UTF-8‐capable terminals.

       *  To  generate glyphs that when copied from rendered pages will produce real minus
          signs when pasted into a terminal.

       To produce unslanted single quotes that render well in ASCII, UTF‐8, and  PDF,  use
       "\(aq" ("apostrophe quote"); for example


       where  C  is  the  quoted character.  This guideline applies also to character con‐
       stants used in code examples.

       Where a proper caret (^) that renders well in both a terminal and PDF is  required,
       use "\(ha".  This is especially necessary in code samples, to get a nicely rendered
       caret when rendering to PDF.

       Using a naked "~" character results in  a  poor  rendering  in  PDF.   Instead  use
       "\(ti".   This  is  especially  necessary in code samples, to get a nicely rendered
       tilde when rendering to PDF.

and also:

Copy link

bagder commented Mar 7, 2021

I have personally searched for minus + text in the curl man page to find the docs for an option quite literally thousands of times and I've never had a problem with that. I presume it will depend on environment or something.

The curl.1 man page is generated at build-time by We should probably consider making a generic regex to fixup minuses in the input to backslash-minuses in the output?

bagder added a commit that referenced this issue Mar 11, 2021
Reported-by: Alejandro Colomar
Fixes #6698
@bagder bagder self-assigned this Mar 11, 2021
Copy link

bagder commented Mar 11, 2021

@alejandro-colomar how do you spot/reproduce this problem?

Copy link

alejandro-colomar commented Mar 11, 2021

Hi @bagder,

Sorry for not answering before; I was busy.

I'm using Debian Sid, so I guess on Debian-based systems it is likely to reproduce.

I guess some distros don't make a difference when rendering the different minus-like symbols and some do. I'm not sure if that's the cause, but it's likely.

The groff maintainers will probably know better and have a good recommendation for how to proceed in your case.



Copy link

bagder commented Mar 12, 2021

@alejandro-colomar any chance you can test my PR (#6722) for your case before I merge it just to double-check it does what we want?

Copy link

alejandro-colomar commented Mar 12, 2021

Yes, I can do that.

However, I've never built curl. I tried following the GIT-INFO, and received some errors:

$ ./buildconf 
*** Do not use buildconf. Instead, just use: autoreconf -fi
configure:7396: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure:7397: error: possibly undefined macro: AC_PROG_LIBTOOL
autoreconf: /usr/bin/autoconf failed with exit status: 1
$ ./configure
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... yes
checking whether to enable c-ares for DNS lookups... no
checking whether to disable dependency on -lrt... (assumed no)
checking whether to enable ECH support... no
checking for path separator... :
checking for sed... /usr/bin/sed
checking for grep... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ar... /usr/bin/ar
configure: error: cannot find install-sh,, or shtool in "." "./.." "./../.."

How should I proceed?

Copy link

dfandrich commented Mar 12, 2021 via email

Copy link

alejandro-colomar commented Mar 14, 2021

$ sudo apt-get install -V libtool
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libtool is already the newest version (2.4.6-15).
libtool set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

@bagder bagder closed this as completed in f83d4ea Mar 14, 2021
Copy link

bagder commented Mar 14, 2021

I merged it so you can instead build from or check the next daily snapshot which comes with pre-generated configure scripts and curl.1 etc.

Copy link


Sorry for the delay. Yes, it's fixed by that PR. I tested the builds 20210312 (for comparison) and 20210315, and the old one didn't work while the new one worked fine.



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Successfully merging a pull request may close this issue.

3 participants