Why can't `$ man` find the location of a page outside the first section when Vim was started as a manpager?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'm trying to debug an issue with the man Neovim plugin.

At :h ft-man-plugin, Neovim recommends to export this variable to use it as a manpager:



export MANPAGER='nvim +Man!'


But if I execute $ man man from the shell, then :Man mount from Neovim, the latter raises this error:



man.vim: command error (11) man -w mount: No manual entry for mount
See 'man 7 undocumented' for help when manual pages are not available.


I've been able to reproduce the issue with this minimal example:



$ MANPAGER='vim -Nu NONE -' man man
:!man -w mount


The first shell command starts the $ man command, using Vim as a manpager (although, here, it's not configured correctly to display the page).
The second Vim command asks a shell to execute $ man -w mount to find the location of the page for the $ mount command. Here is its output:



No manual entry for mount
See 'man 7 undocumented' for help when manual pages are not available.

shell returned 16


I've also tried with Neovim instead of Vim, and with system() instead of :! (i.e. :echo system('man -w mount')), but the result is always the same; $ man doesn't find the page for the $ mount command.



The issue disappears if (Neo)Vim is started directly with the $ vim (or $ nvim) command instead of indirectly via $MANPAGER.
So these commands correctly find the location of the $ mount command:



$ zcat /usr/share/man/man1/man.1.gz | vim -Nu NONE -
:!man -w mount


It also disappears if I ask for a page from the first section of the manual.
So these commands correctly find the location of the $ ls command:



$ MANPAGER='vim -Nu NONE -' man man
:!man -w ls


It also disappears if I manually provide the section number of the page.
So these commands correctly find the location of the $ mount command:



$ MANPAGER='vim -Nu NONE -' man man
:!man -s8 -w mount


The issue happens only when (Neo)Vim is started as a manpager and I ask $ man to find a page outside the first section of the manual, without providing the section number of the page.




Here are some information about my machine:




  • vim --version: VIM - Vi IMproved 8.1 Included patches: 1-495

  • Operating system: Ubuntu 16.04.5 LTS

  • Terminal emulator: rxvt-unicode v9.22

  • Terminal multiplexer: tmux 2.8


  • $TERM: tmux-256color

  • Shell: zsh 5.6.2-dev-0 (x86_64-pc-linux-gnu)


Why can't $ man find the pages outside the first section when Vim was started as a manpager?









share



























    up vote
    0
    down vote

    favorite












    I'm trying to debug an issue with the man Neovim plugin.

    At :h ft-man-plugin, Neovim recommends to export this variable to use it as a manpager:



    export MANPAGER='nvim +Man!'


    But if I execute $ man man from the shell, then :Man mount from Neovim, the latter raises this error:



    man.vim: command error (11) man -w mount: No manual entry for mount
    See 'man 7 undocumented' for help when manual pages are not available.


    I've been able to reproduce the issue with this minimal example:



    $ MANPAGER='vim -Nu NONE -' man man
    :!man -w mount


    The first shell command starts the $ man command, using Vim as a manpager (although, here, it's not configured correctly to display the page).
    The second Vim command asks a shell to execute $ man -w mount to find the location of the page for the $ mount command. Here is its output:



    No manual entry for mount
    See 'man 7 undocumented' for help when manual pages are not available.

    shell returned 16


    I've also tried with Neovim instead of Vim, and with system() instead of :! (i.e. :echo system('man -w mount')), but the result is always the same; $ man doesn't find the page for the $ mount command.



    The issue disappears if (Neo)Vim is started directly with the $ vim (or $ nvim) command instead of indirectly via $MANPAGER.
    So these commands correctly find the location of the $ mount command:



    $ zcat /usr/share/man/man1/man.1.gz | vim -Nu NONE -
    :!man -w mount


    It also disappears if I ask for a page from the first section of the manual.
    So these commands correctly find the location of the $ ls command:



    $ MANPAGER='vim -Nu NONE -' man man
    :!man -w ls


    It also disappears if I manually provide the section number of the page.
    So these commands correctly find the location of the $ mount command:



    $ MANPAGER='vim -Nu NONE -' man man
    :!man -s8 -w mount


    The issue happens only when (Neo)Vim is started as a manpager and I ask $ man to find a page outside the first section of the manual, without providing the section number of the page.




    Here are some information about my machine:




    • vim --version: VIM - Vi IMproved 8.1 Included patches: 1-495

    • Operating system: Ubuntu 16.04.5 LTS

    • Terminal emulator: rxvt-unicode v9.22

    • Terminal multiplexer: tmux 2.8


    • $TERM: tmux-256color

    • Shell: zsh 5.6.2-dev-0 (x86_64-pc-linux-gnu)


    Why can't $ man find the pages outside the first section when Vim was started as a manpager?









    share

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm trying to debug an issue with the man Neovim plugin.

      At :h ft-man-plugin, Neovim recommends to export this variable to use it as a manpager:



      export MANPAGER='nvim +Man!'


      But if I execute $ man man from the shell, then :Man mount from Neovim, the latter raises this error:



      man.vim: command error (11) man -w mount: No manual entry for mount
      See 'man 7 undocumented' for help when manual pages are not available.


      I've been able to reproduce the issue with this minimal example:



      $ MANPAGER='vim -Nu NONE -' man man
      :!man -w mount


      The first shell command starts the $ man command, using Vim as a manpager (although, here, it's not configured correctly to display the page).
      The second Vim command asks a shell to execute $ man -w mount to find the location of the page for the $ mount command. Here is its output:



      No manual entry for mount
      See 'man 7 undocumented' for help when manual pages are not available.

      shell returned 16


      I've also tried with Neovim instead of Vim, and with system() instead of :! (i.e. :echo system('man -w mount')), but the result is always the same; $ man doesn't find the page for the $ mount command.



      The issue disappears if (Neo)Vim is started directly with the $ vim (or $ nvim) command instead of indirectly via $MANPAGER.
      So these commands correctly find the location of the $ mount command:



      $ zcat /usr/share/man/man1/man.1.gz | vim -Nu NONE -
      :!man -w mount


      It also disappears if I ask for a page from the first section of the manual.
      So these commands correctly find the location of the $ ls command:



      $ MANPAGER='vim -Nu NONE -' man man
      :!man -w ls


      It also disappears if I manually provide the section number of the page.
      So these commands correctly find the location of the $ mount command:



      $ MANPAGER='vim -Nu NONE -' man man
      :!man -s8 -w mount


      The issue happens only when (Neo)Vim is started as a manpager and I ask $ man to find a page outside the first section of the manual, without providing the section number of the page.




      Here are some information about my machine:




      • vim --version: VIM - Vi IMproved 8.1 Included patches: 1-495

      • Operating system: Ubuntu 16.04.5 LTS

      • Terminal emulator: rxvt-unicode v9.22

      • Terminal multiplexer: tmux 2.8


      • $TERM: tmux-256color

      • Shell: zsh 5.6.2-dev-0 (x86_64-pc-linux-gnu)


      Why can't $ man find the pages outside the first section when Vim was started as a manpager?









      share















      I'm trying to debug an issue with the man Neovim plugin.

      At :h ft-man-plugin, Neovim recommends to export this variable to use it as a manpager:



      export MANPAGER='nvim +Man!'


      But if I execute $ man man from the shell, then :Man mount from Neovim, the latter raises this error:



      man.vim: command error (11) man -w mount: No manual entry for mount
      See 'man 7 undocumented' for help when manual pages are not available.


      I've been able to reproduce the issue with this minimal example:



      $ MANPAGER='vim -Nu NONE -' man man
      :!man -w mount


      The first shell command starts the $ man command, using Vim as a manpager (although, here, it's not configured correctly to display the page).
      The second Vim command asks a shell to execute $ man -w mount to find the location of the page for the $ mount command. Here is its output:



      No manual entry for mount
      See 'man 7 undocumented' for help when manual pages are not available.

      shell returned 16


      I've also tried with Neovim instead of Vim, and with system() instead of :! (i.e. :echo system('man -w mount')), but the result is always the same; $ man doesn't find the page for the $ mount command.



      The issue disappears if (Neo)Vim is started directly with the $ vim (or $ nvim) command instead of indirectly via $MANPAGER.
      So these commands correctly find the location of the $ mount command:



      $ zcat /usr/share/man/man1/man.1.gz | vim -Nu NONE -
      :!man -w mount


      It also disappears if I ask for a page from the first section of the manual.
      So these commands correctly find the location of the $ ls command:



      $ MANPAGER='vim -Nu NONE -' man man
      :!man -w ls


      It also disappears if I manually provide the section number of the page.
      So these commands correctly find the location of the $ mount command:



      $ MANPAGER='vim -Nu NONE -' man man
      :!man -s8 -w mount


      The issue happens only when (Neo)Vim is started as a manpager and I ask $ man to find a page outside the first section of the manual, without providing the section number of the page.




      Here are some information about my machine:




      • vim --version: VIM - Vi IMproved 8.1 Included patches: 1-495

      • Operating system: Ubuntu 16.04.5 LTS

      • Terminal emulator: rxvt-unicode v9.22

      • Terminal multiplexer: tmux 2.8


      • $TERM: tmux-256color

      • Shell: zsh 5.6.2-dev-0 (x86_64-pc-linux-gnu)


      Why can't $ man find the pages outside the first section when Vim was started as a manpager?







      vim man





      share














      share












      share



      share








      edited 16 secs ago

























      asked 6 mins ago









      user938271

      18917




      18917

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477855%2fwhy-cant-man-find-the-location-of-a-page-outside-the-first-section-when-vim%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477855%2fwhy-cant-man-find-the-location-of-a-page-outside-the-first-section-when-vim%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?