Compiled from: https://www.ostechnix.com/how creates and maintains its own homepage /
作者:斯克
翻译:路-世界
我们已经讨论了人类手册的一些替代品。这些替代方案主要用于学习简洁的Linux命令示例,而不需要经过全面和过于详细的手册页。如果您正在寻找一种快速简单的方法来轻松快速地学习Linux命令,这些替代方法是值得尝试的。现在,您可能正在考虑如何为Linux命令创建自己的人风格帮助页面,然后“um”会派上用场。um是一个命令行实用程序,可用于轻松创建和维护包含您迄今所知所有命令的手册页。
通过创建自己的手册页,你可以避免手册页中许多不必要的细节,只包括你需要记住的内容。如果你想创建自己的一套仿人页面,“嗯”也可以帮助你。在这个简短的教程中,我们将学习如何安装“um”命令以及如何创建我们自己的手册页。
嗯适用于Linux和Mac操作系统。目前,它只能使用Linux BREW软件包管理器安装在Linux系统中。如果您尚未安装Linux BREW,请参考以下链接:
安装Linux BREW后,运行以下命令安装UM实用程序。
$ BREW Installation Sinclair Target / WST / UM
如果您将看到类似以下内容的输出,祝贺您!um已经安装好,可以使用了。
[...]
= = >; Install Sinclair Target / WST / UM
= = >;下载https://github.com/sinclairtarget/um/archive/4.0.0.tar.gz
= = >;从https://codeload.github.com/sinclairtarget/um/tar.gz/4.0.0下载
- = # = # # #
= = >;下载https://rubygems.org/gems/kramdown 1号。17。0。宝石
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 100.0 %
= = >; GEM Installation / Home / SK /. Cache / Homemade Program / Download / D055D 978120 A791 D9695 FC 103866815189 A4E 3939
= = >; Warning
Bash Complete Installed to:
/ home / linuxbrew / .linuxbrew /等/ bash _完成
= = >; abstract
[ /家庭/ linuxbrew / .linuxbrew /细胞/ um / 4。0。0 : 714个文件13mb,在thirty-five秒内构建
= = >; Warning
= = >; Open source software
CA files have been booted with certificates from the system root directory
Key chain. Add additional certificates ( for example, added certificates
System keychain ), placed. The file is in
/ home / linuxbrew / .linuxbrew /等/开放源码软件/证书
Run away
/ home / linuxbrew / .linuxbrew / opt / OpenSSL / bin / c _ rehash
= = >; Ruby
Emacs LISP file installed to:
/ home / linuxbrew / .linuxbrew /共享/电子邮件/网站-莉斯普/鲁比
= = >; Well
Bash Complete Installed to:
/ home / linuxbrew / .linuxbrew /等/ bash _完成
在制作手册页面之前,你需要为um启用bash完成。
要打开bash完成,首先需要打开~ /。bash _ profile文件:
$ nano ~ /。 Bash profile
并添加以下内容:
如果[ -法郎( brew -前缀) /等/ bash _ complete。丁/嗯-完成。sh ];然后
。$ ( brew -前缀) /等/ bash _ complete。丁/嗯-完成。嘘
The shipping side does not bear the cost of loading
保存并关闭文件。运行以下命令更新更改。
$ source ~ /。 Bash profile
所有的准备工作都完成了。让我们继续创建我们的第一个手册页。
如果您想为dpkg命令创建自己的手册。请跑:
$ um editing unit: kg
上述命令将在默认编辑器中打开标记模板:
我的默认编辑器是VI,因此上面的命令将在VI编辑器中打开它。现在,开始将有关DPKG命令的所有内容添加到该模板中。
下面是一个例子:
正如您在上面的输出中看到的,我为DPKG命令添加了一个摘要、描述和两个参数选项。你可以将你需要的所有零件添加到手册中。但是,您还需要确保为每个部分提供适当且易于理解的标题。完成后,保存并退出文件(如果使用VI编辑器,请按ESC键并键入: WQ )。
最后,使用以下命令查看新创建的手册页:
Millions of kilograms
正如你所看到的,DPKG的手册页看起来和官方手册页完全一样。如果要编辑和/或添加手册页中的更多详细信息,请再次运行同一命令并添加更多详细信息。
$ um editing unit: kg
要使用UM查看新创建的手册页列表,请运行:
$ um list
所有手册页都将以该名称保存在主目录中。嗯
以防万一,如果你不想要特定的页面,就删除它,如下所示。
Million mark
要查看帮助部分和所有可用的常规选项,请运行:
$ um - help
Purpose: Mm;
Well: subcommands >; [ Argentina ... ]
The first form is equivalent to " um read; `。
Suborders:
Lists the available pages for the current topic.
Leadership and leadership; Page name >; Read the given page under the current topic.
Editing and translation; Page name >; Create or edit a given page under the current topic.
Um: page name >; Deletes the given page.
Gets or sets the current topic.
Well, the topic lists all the topics.
UM ( C ) ONFIG [ Configuration Key ] displays the configuration environment.
UM ( H ) ELP [ subcommand ] displays the help message for this help message or subcommand.
要查看当前配置,请运行:
$ um configuration
The option prefixed with " *" is set at / home / sk /. Um / Unified Configuration.
Edit = 6
Pagers = Less
页面目录= / home / sk / .嗯/页
Default Subject = Shell
pages _ ext =。 Doctor of medicine
在此文件中,您可以根据需要编辑和更改寻呼机、编辑器、Default _ Topic、Pages _ Directory和Pages _ Ext选项的值。例如,如果要将新创建的um页面保存在Dropbox文件夹中,只需更改~/ /中pages _ directory的值。um / umconfig文件,并将其更改为下拉框文件夹。
Pages _ Directory = / Users / My User Name / Drop - down Box / Hm
这就是全部内容。我希望这些能对你有用。请注意更多好的内容。
干杯!
VIA: https://www.ostechnix.com/how creates and maintains your own homepage /
作者: SK主题选择:陆军9972翻译: WW校对: WXY
这篇文章最初是由LCTT编写的,Linux很荣幸地在中国推出
领取专属 10元无门槛券
私享最新 技术干货