lucc / nvimpager

Use nvim as a pager to view manpages, diffs, etc with nvim's syntax highlighting
Other
386 stars 20 forks source link

Manpage produced by scdoc is blank #51

Closed midirhee12 closed 2 years ago

midirhee12 commented 3 years ago

I saw that when running make, a nvimpager.1 was created. Without knowing much about scdoc, I'd assume there isn't documentation yet or scdoc is failing to find it in the source repository.

If this is the case of being no docs, we (including myself as I remember the manpage language quite well) can choose to write the manpage by hand removing scdoc as a dependency, or we could try to write your scdoc thing.

If this is the case of scdoc not finding the code for the document to be created, well, now you know to fix it I guess haha.

lucc commented 3 years ago

Can you tell me which commit you checked out and what the makefile says? I noticed that if scdoc is not installed the makefile generates an empty nvimpager.1 file. Do you have scdoc installed?

midirhee12 commented 3 years ago

Commit dce5017c14fc07d0ba775b8751d0e3de8939bf8d

And yes, scdoc is installed.

midirhee12 commented 3 years ago

Same result with commit 49315df9df29a37376af1cb3e00b1708caf4cf7c

lucc commented 3 years ago

Can you post the complete output of make clean && make nvimpager.1 and also tell me the version of scdoc you have or which shell and which make you use?

docwhat commented 3 years ago

On macOS with zsh and with macOS's built in BSD-flavored sed:

❯ make clean nvimpager.1
rm -f nvimpager.configured nvimpager.1 luacov.*
sed '1cnvimpager(1) "nvimpager v0.10.2"' nvimpager.md | scdoc > nvimpager.1
sed: 1: "1cnvimpager(1) "nvimpag ...": command c expects \ followed by text
❯ cat nvimpager.1
.\" Generated by scdoc 1.11.1
.\" Complete documentation for this program is not available as a GNU info page
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.nh
.ad l
.\" Begin generated content:
❯

In my case, I can work around it by brew install gnu-sed and then using this command:

env PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH" make clean nvimpager.1
docwhat commented 3 years ago

An issue with table formatting moved to #54

lucc commented 3 years ago

@docwhat please try the latest develop branch, the sed command in your makefile has been fixed.

docwhat commented 3 years ago

@docwhat please try the latest develop branch, the sed command in your makefile has been fixed.

Cool, that fixed the sed issue. I opened #54 for the table format issue.