信息命令和手册页

劳斯

Fedora 19 {尽管我怀疑这是相关的]

如果我调用info了一个主题,实际上并没有一个命令info节点,但确实有一个手册页,info显然将创建一个名为节点(*manpages*)<topic>从该名男子页-对飞。

我无法在任何地方找到该功能的文档,也找不到(显然)其完成方式的描述。

谁能指出我关于此的一些文档?

法案

我检查了GNU独立信息手册GNU Info手册,却发现该功能存在一个很小的迹象。选项-描述中,我们可以阅读以下内容:

-全部-a

Find all files matching the given menu-item (a file or node name).
Three usage patterns are supported, as follows.

First, if --all is used together with --where, info prints the names
of all matching files found on standard output (including *manpages*
if relevant) and exits.

因此,恐怕唯一的文档就是源代码。info.c中,您可以找到以下功能。查找“返回到加载手册页”。评论。

/* Get the initial Info file, either by following menus from "(dir)Top",
   or what the user specifed with values in filename. */
static char *
get_initial_file (char *filename, int *argc, char ***argv, char **error)
{
  char *initial_file = 0;           /* First file loaded by Info. */
  REFERENCE *entry;

  /* If there are any more arguments, the initial file is the
     dir entry given by the first one. */
  if (!filename && (*argv)[0])
    {
      /* If they say info -O info, we want to show them the invocation node
         for standalone info; there's nothing useful in info.texi.  */
      if (goto_invocation_p && (*argv)[0]
          && mbscasecmp ((*argv)[0], "info") == 0)
        (*argv)[0] = "info-stnd";

      entry = lookup_dir_entry ((*argv)[0], 0);
      if (entry)
        {
          initial_file = info_find_fullpath (entry->filename, 0);
          if (initial_file)
            {
              (*argv)++; /* Advance past first remaining argument. */
              (*argc)--;

              /* Store full path, so that we find the already loaded file in
                 info_find_file, and show the full path if --where is used. */
              entry->filename = initial_file;
              add_pointer_to_array (info_copy_reference (entry),
                  ref_index, ref_list, ref_slots, 2);
              return initial_file;
            }
        }
    }

  /* User used "--file". */
  if (filename)
    {
      initial_file = info_find_fullpath (filename, 0);

      if (!initial_file)
        {
          if (filesys_error_number)
            *error = filesys_error_string (filename, filesys_error_number);
        }
      else
        return initial_file;
    }

  /* File name lookup. */
  if (!filename && (*argv)[0])
    {
      /* Try finding a file with this name, in case
         it exists, but wasn't listed in dir. */
      initial_file = info_find_fullpath ((*argv)[0], 0);
      if (initial_file)
        {
          (*argv)++; /* Advance past first remaining argument. */
          (*argc)--;
          return initial_file;
        }
      else
        asprintf (error, _("No menu item `%s' in node `%s'."),
            (*argv)[0], "(dir)Top");
    }

  /* Fall back to loading man page. */
  if (filename || (*argv)[0])
    {
      NODE *man_node;

      debug (3, ("falling back to manpage node"));

      man_node = get_manpage_node (filename ? filename : (*argv)[0]);
      if (man_node)
        {
          add_pointer_to_array
            (info_new_reference (MANPAGE_FILE_BUFFER_NAME,
               filename ? filename : (*argv)[0]),
             ref_index, ref_list, ref_slots, 2);

          initial_file = MANPAGE_FILE_BUFFER_NAME;
          return initial_file;
        }
    }

  /* Inexact dir lookup. */
  if (!filename && (*argv)[0])
    {
      entry = lookup_dir_entry ((*argv)[0], 1);
      if (entry)
        {
          (*argv)++; /* Advance past first remaining argument. */
          (*argc)--;
          /* Clear error message. */
          free (*error);
          *error = 0;

          initial_file = info_find_fullpath (entry->filename, 0);
          /* Store full path, so that we find the already loaded file in
             info_find_file, and show the full path if --where is used. */
          entry->filename = initial_file;
          add_pointer_to_array (info_copy_reference (entry),
              ref_index, ref_list, ref_slots, 2);
          return initial_file;
        }
    }

  /* Otherwise, we want the dir node.  The only node to be displayed
     or output will be "Top". */
  return 0;
}

man.h包含MANPAGE_FILE_BUFFER_NAME的定义:

#define MANPAGE_FILE_BUFFER_NAME "*manpages*"

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

请解释命令mv的手册页

来自分类Dev

缺少某些命令的手册页

来自分类Dev

info命令是否显示手册页?

来自分类Dev

没有用于类型命令的手册页或信息页

来自分类Dev

如何使KHelpCenter显示ScrollKeeper数据库中的信息页,手册页和信息并进行全文搜索?

来自分类Dev

如何获得RPC服务的类似手册页的帮助信息?

来自分类Dev

如何仅显示相应命令手册页的路径?

来自分类Dev

如何轻松查看内置shell命令的手册页?

来自分类Dev

如何仅显示相应命令手册页的路径?

来自分类Dev

使用手册页查找命令

来自分类Dev

在哪里查看Bash内置命令的手册页?

来自分类Dev

如何检查手册页中命令的单个参数?

来自分类Dev

grep带有连字符选项的命令的手册页

来自分类Dev

grep带有连字符选项的命令的手册页

来自分类Dev

xhost:手册页存在但命令不起作用

来自分类Dev

手册页中缺少的命令(手册中的空白)

来自分类Dev

何时使用man和man -k检查手册页?

来自分类Dev

zsh的zmv:空运行和手册页

来自分类Dev

如何避免make生成和安装手册页?

来自分类Dev

如何安装手册页?

来自分类Dev

全文搜索手册页

来自分类Dev

如何安装手册页?

来自分类Dev

缺少`ifconfig`的手册页

来自分类Dev

提交更新的手册页

来自分类Dev

“肮脏的”手册页消息

来自分类Dev

手册页中的颜色

来自分类Dev

导出pdf手册页

来自分类Dev

我的点燃手册页?

来自分类Dev

手册页已过时