Hacker News new | past | comments | ask | show | jobs | submit login

current macOS man pages are kind of off-putting, even for someone who has been using c and unix for decades. I mean, really, what is this?

    InFILE In*
     fopen(Inconst Inchar In* Inrestrict Inpath, Inconst Inchar In* Inrestrict Inmode);
Inconst InFILE In* Inrestrict Inpath?!

     FILE *fopen(const char *, const char *mode);
it's like looking at a ton of gibberish and trying to figure out what it says. it doesn't match the languages, it doesn't appear to match any standards.

I learned a lot from man pages in the 80's and 90's, and if I had to try to learn now from something like this, I'd likely just throw up my hands and choose another career.




My educated guess is that something is trying to italicize various keywords, and whatever text processing is going on isn't working, but producing bogus "In" literal text instead.

.I is the "an" macro for italics, after all.


Compare what one sees when the text processing works, and what parts are italicized.

* https://tty0.social/@JdeBP/110427220635184435

It even prettifies those ``'' quotes, notice. This is vanilla older FreeBSD man, using groff, but actually allowing groff to do the things that it is capable of.


This matches what I see using less as manpager and every terminal I have installed on MacOS (Apple Terminal, kitty, alacritty+Tmux, iTerm).


I don't think that's a macOS bug. Your terminal emulation might be borked.

What terminal are you using? I just tested on Terminal.app and iTerm2.app -- `man fopen` looks correct on both.

The following should be equivalent, but might perform differently for you depending on what part of your config is bad:

  cat /usr/share/man/man3/fopen.3 | nroff -man | more


iterm2.app - but I also use fish as my shell

TERM=xterm-256color and LESS_TERMCAP_us=In


Your LESS_TERMCAP_us is the issue here; it's literally putting "In" wherever an underline is supposed to start.


As others have noted, the 'In' looks like a rendering bug with whatever terminal emulator you're using. Otherwise it looks pretty normal: `fopen (const char *restrict filename, const char *restrict mode)` looks like a perfectly good C function, and (if you already know C) it's easy to see the parts that don't look like they belong.



amazing how web pages look different than terminal output :)


Looked fine in two terminal apps too, but you can't copy paste that!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: