* man 1 getopts example code - wrong dash @ 2017-02-27 14:16 Marcus Geiger [not found] ` <CADOJ=xsjhuZ7_r8JXgfcgXVRi-bf1gN9irBnOePra+i-xv9HuA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Marcus Geiger @ 2017-02-27 14:16 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA Hello, in the examples section of `man 1 getopts`, every dash/minus used in the example code cannot be parsed by bash. vi claims it's 0x2212 instead of 0x2d. I'm on Ubuntu 16.04 with bash 4.3.46(1)-release. Unfortunately I couldn't find the source code for this man page, but the current online pages entry also has this problem: http://man7.org/linux/man-pages/man1/getopts.1p.html The containing package is: $ dpkg -S $(man -w 1 getopts) manpages-posix: /usr/share/man/man1/getopts.1posix.gz Kind regards Marcus Geiger -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CADOJ=xsjhuZ7_r8JXgfcgXVRi-bf1gN9irBnOePra+i-xv9HuA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: man 1 getopts example code - wrong dash [not found] ` <CADOJ=xsjhuZ7_r8JXgfcgXVRi-bf1gN9irBnOePra+i-xv9HuA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2017-02-27 16:02 ` walter harms 2017-03-13 3:31 ` Mike Frysinger 1 sibling, 0 replies; 5+ messages in thread From: walter harms @ 2017-02-27 16:02 UTC (permalink / raw) To: Marcus Geiger Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, linux-man-u79uwXL29TY76Z2rM5mHXA i tried the example from http://man7.org/linux/man-pages/man1/getopts.1p.html and it failed because some invisible chars where embedded sh -x page.sh + aflag= + bflag= + getopts ab: name + '[' '!' $'\342\210\222z' '' ']' page.sh: line 13: [: −z: unary operator expected + '[' '!' $'\342\210\222z' '' ']' page.sh: line 16: [: −z: unary operator expected page.sh: line 19: 1 − 1: syntax error: invalid arithmetic operator (error token is "− 1") this does not happen when i clip the example rendered with groff (aka man). i guess your problem may have the some origin. re, wh Am 27.02.2017 15:16, schrieb Marcus Geiger: > Hello, > > in the examples section of `man 1 getopts`, every dash/minus used in the > example code cannot be parsed by bash. vi claims it's 0x2212 instead of 0x2d. > > I'm on Ubuntu 16.04 with bash 4.3.46(1)-release. Unfortunately I couldn't find > the source code for this man page, but the current online pages entry also has > this problem: http://man7.org/linux/man-pages/man1/getopts.1p.html > > The containing package is: > > $ dpkg -S $(man -w 1 getopts) > manpages-posix: /usr/share/man/man1/getopts.1posix.gz > > Kind regards > > Marcus Geiger > -- > To unsubscribe from this list: send the line "unsubscribe linux-man" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: man 1 getopts example code - wrong dash [not found] ` <CADOJ=xsjhuZ7_r8JXgfcgXVRi-bf1gN9irBnOePra+i-xv9HuA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-02-27 16:02 ` walter harms @ 2017-03-13 3:31 ` Mike Frysinger 2017-12-03 15:25 ` minus signs instead of hyphen-minuses in man-pages-posix-2013-a (was: man 1 getopts example code - wrong dash) Nico R. 1 sibling, 1 reply; 5+ messages in thread From: Mike Frysinger @ 2017-03-13 3:31 UTC (permalink / raw) To: Marcus Geiger Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, linux-man-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 770 bytes --] On 27 Feb 2017 15:16, Marcus Geiger wrote: > in the examples section of `man 1 getopts`, every dash/minus used in the > example code cannot be parsed by bash. vi claims it's 0x2212 instead of 0x2d. > > I'm on Ubuntu 16.04 with bash 4.3.46(1)-release. Unfortunately I couldn't find > the source code for this man page, but the current online pages entry also has > this problem: http://man7.org/linux/man-pages/man1/getopts.1p.html > > The containing package is: > > $ dpkg -S $(man -w 1 getopts) > manpages-posix: /usr/share/man/man1/getopts.1posix.gz looks like a bug in the man page itself. it uses \(mi instead of \- in the example code. might be an artifact of the conversion process though as iirc, the posix pages are generated. -mike [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* minus signs instead of hyphen-minuses in man-pages-posix-2013-a (was: man 1 getopts example code - wrong dash) 2017-03-13 3:31 ` Mike Frysinger @ 2017-12-03 15:25 ` Nico R. [not found] ` <20171203152541.GB8608-apn8OiFnwzd6HCqoLBzdJtgH40HQ1Lc/@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Nico R. @ 2017-12-03 15:25 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA On 2017-03-13T03:31:45, Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> wrote: > On 27 Feb 2017 15:16, Marcus Geiger wrote: > > in the examples section of `man 1 getopts`, every dash/minus used in the > > example code cannot be parsed by bash. vi claims it's 0x2212 instead of 0x2d. > > > > I'm on Ubuntu 16.04 with bash 4.3.46(1)-release. Unfortunately I couldn't find > > the source code for this man page, but the current online pages entry also has > > this problem: http://man7.org/linux/man-pages/man1/getopts.1p.html > > > > The containing package is: > > > > $ dpkg -S $(man -w 1 getopts) > > manpages-posix: /usr/share/man/man1/getopts.1posix.gz > > looks like a bug in the man page itself. it uses \(mi instead of \- in > the example code. might be an artifact of the conversion process though > as iirc, the posix pages are generated. I agree. As the matter seems not to have been handled yet, I’m bringing this up again. Some more detail: it seems that all POSIX man pages are affected, more or less. For example, look at man1p/awk.1p in man-pages-posix-2013-a: it says | −F sepstring | Define the input field separator. This option shall be equivalent to: | | -v FS=sepstring Note that the first occurrence is a MINUS SIGN (U+2212), whereas the second is a HYPHEN-MINUS (U+002D). The MINUS SIGN is wrong for options. Options start with a HYPHEN-MINUS. Due to the bug, searching for options in POSIX man pages becomes a real pain. Some people may not see this behavior, this is most probably a result of their locale. You can run $ env LC_CTYPE=POSIX /usr/bin/man 1p awk and you will see a HYPHEN-MINUS everywhere, but this is due to the limited character set, and character translations in place. Setting LC_CTYPE is just a workaround, and you’ll also lose other characters! I would have tried to help a bit more with this issue, but I do not know what/where the sources for the POSIX man pages are, I do not know how the POSIX man pages are generated from their sources, and I could not find any conversion scripts. Can anyone explain the process, please? -- Nico -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20171203152541.GB8608-apn8OiFnwzd6HCqoLBzdJtgH40HQ1Lc/@public.gmane.org>]
* Re: minus signs instead of hyphen-minuses in man-pages-posix-2013-a (was: man 1 getopts example code - w [not found] ` <20171203152541.GB8608-apn8OiFnwzd6HCqoLBzdJtgH40HQ1Lc/@public.gmane.org> @ 2018-02-09 7:22 ` Daniel Lublin 0 siblings, 0 replies; 5+ messages in thread From: Daniel Lublin @ 2018-02-09 7:22 UTC (permalink / raw) To: linux-man-u79uwXL29TY76Z2rM5mHXA Cc: nico-hByViTdnw2w, sir-ADJa8SdUZZIAvxtiuMwx3w Trying to pick up on this again -- dashes in the POSIX man-pages are mostly of the wrong sort, and makes it difficult to search for options in the pages. (Cc Drew DeVault, yes I came across this from your blog post) On 2017-12-03 15:25:41, Nico R <nico-hByViTdnw2w@public.gmane.org> wrote: > On 2017-03-13T03:31:45, Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> wrote: > > On 27 Feb 2017 15:16, Marcus Geiger wrote: > > > in the examples section of `man 1 getopts`, every dash/minus used in the > > > example code cannot be parsed by bash. vi claims it's 0x2212 instead of 0x2d. > > > > > > I'm on Ubuntu 16.04 with bash 4.3.46(1)-release. Unfortunately I couldn't find > > > the source code for this man page, but the current online pages entry also has > > > this problem: http://man7.org/linux/man-pages/man1/getopts.1p.html > > > > > > The containing package is: > > > > > > $ dpkg -S $(man -w 1 getopts) > > > manpages-posix: /usr/share/man/man1/getopts.1posix.gz > > > > looks like a bug in the man page itself. it uses \(mi instead of \- in > > the example code. might be an artifact of the conversion process though > > as iirc, the posix pages are generated. > > I agree. As the matter seems not to have been handled yet, I’m bringing this > up again. > > Some more detail: it seems that all POSIX man pages are affected, more or > less. [...] > I would have tried to help a bit more with this issue, but I do not know > what/where the sources for the POSIX man pages are, I do not know how the > POSIX man pages are generated from their sources, and I could not find any > conversion scripts. Can anyone explain the process, please? I found https://www.kernel.org/doc/man-pages/todo.html which states: Status: completed in January 2014 (publication of the POSIX.1-2013 pages). And looking in the man-pages website repo, Michael Kerrisk committed this. So if you Michael also did the actual update of the POSIX man-pages, do you have pointers to the sources for them, and any scripts which where used to process them (according to todo.html) to produce the man-files? /Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-02-09 7:22 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-02-27 14:16 man 1 getopts example code - wrong dash Marcus Geiger [not found] ` <CADOJ=xsjhuZ7_r8JXgfcgXVRi-bf1gN9irBnOePra+i-xv9HuA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-02-27 16:02 ` walter harms 2017-03-13 3:31 ` Mike Frysinger 2017-12-03 15:25 ` minus signs instead of hyphen-minuses in man-pages-posix-2013-a (was: man 1 getopts example code - wrong dash) Nico R. [not found] ` <20171203152541.GB8608-apn8OiFnwzd6HCqoLBzdJtgH40HQ1Lc/@public.gmane.org> 2018-02-09 7:22 ` minus signs instead of hyphen-minuses in man-pages-posix-2013-a (was: man 1 getopts example code - w Daniel Lublin
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.