<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> Module: Doing::Completion — Documentation by YARD 0.9.34 </title> <link rel="stylesheet" href="../css/style.css" type="text/css" /> <link rel="stylesheet" href="../css/common.css" type="text/css" /> <script type="text/javascript"> pathId = "Doing::Completion"; relpath = '../'; </script> <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script> <script type="text/javascript" charset="utf-8" src="../js/app.js"></script> </head> <body> <div class="nav_wrap"> <iframe id="nav" src="../class_list.html?1"></iframe> <div id="resizer"></div> </div> <div id="main" tabindex="-1"> <div id="header"> <div id="menu"> <a href="../_index.html">Index (C)</a> » <span class='title'><span class='object_link'><a href="../Doing.html" title="Doing (module)">Doing</a></span></span> » <span class="title">Completion</span> </div> <div id="search"> <a class="full_list_link" id="class_list_link" href="../class_list.html"> <svg width="24" height="24"> <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect> <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect> <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect> </svg> </a> </div> <div class="clear"></div> </div> <div id="content"><h1>Module: Doing::Completion </h1> <div class="box_info"> <dl> <dt>Defined in:</dt> <dd>lib/doing/completion.rb<span class="defines">,<br /> lib/doing/completion/fig_completion.rb,<br /> lib/doing/completion/zsh_completion.rb,<br /> lib/doing/completion/bash_completion.rb,<br /> lib/doing/completion/fish_completion.rb,<br /> lib/doing/completion/completion_string.rb</span> </dd> </dl> </div> <h2>Overview</h2><div class="docstring"> <div class="discussion"> <p>Completion script generator</p> </div> </div> <div class="tags"> </div><h2>Defined Under Namespace</h2> <p class="children"> <strong class="modules">Modules:</strong> <span class='object_link'><a href="Completion/StringUtils.html" title="Doing::Completion::StringUtils (module)">StringUtils</a></span> <strong class="classes">Classes:</strong> <span class='object_link'><a href="Completion/BashCompletions.html" title="Doing::Completion::BashCompletions (class)">BashCompletions</a></span>, <span class='object_link'><a href="Completion/FigCompletions.html" title="Doing::Completion::FigCompletions (class)">FigCompletions</a></span>, <span class='object_link'><a href="Completion/FishCompletions.html" title="Doing::Completion::FishCompletions (class)">FishCompletions</a></span>, <span class='object_link'><a href="Completion/ZshCompletions.html" title="Doing::Completion::ZshCompletions (class)">ZshCompletions</a></span> </p> <h2> Constant Summary <small><a href="#" class="constants_summary_toggle">collapse</a></small> </h2> <dl class="constants"> <dt id="OPTIONS_RX-constant" class="">OPTIONS_RX = </dt> <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>(?:-(?<short>\w), )?(?:--(?:\[no-\])?(?<long>\w+)(?:=(?<arg>\w+))?)\s+- (?<desc>.*?)$</span><span class='regexp_end'>/</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd> <dt id="SECTIONS_RX-constant" class="">SECTIONS_RX = </dt> <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>(?m-i)^([A-Z ]+)\n([\s\S]*?)(?=\n+[A-Z]+|\Z)</span><span class='regexp_end'>/</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd> <dt id="COMMAND_RX-constant" class="">COMMAND_RX = </dt> <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^(?<cmd>[^, \t]+)(?<alias>(?:, [^, \t]+)*)?\s+- (?<desc>.*?)$</span><span class='regexp_end'>/</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd> </dl> <h2> Class Method Summary <small><a href="#" class="summary_toggle">collapse</a></small> </h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="#generate_completion-class_method" title="generate_completion (class method)">.<strong>generate_completion</strong>(type: 'zsh', file: :default, link: true) ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'><p>Generate a completion script and output to file or stdout.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#get_help_sections-class_method" title="get_help_sections (class method)">.<strong>get_help_sections</strong>(command = "") ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#install_builtin-class_method" title="install_builtin (class method)">.<strong>install_builtin</strong>(type) ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#link_default-class_method" title="link_default (class method)">.<strong>link_default</strong>(type) ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#normalize_type-class_method" title="normalize_type (class method)">.<strong>normalize_type</strong>(type) ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#parse_command-class_method" title="parse_command (class method)">.<strong>parse_command</strong>(command) ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#parse_commands-class_method" title="parse_commands (class method)">.<strong>parse_commands</strong>(commands) ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#parse_option-class_method" title="parse_option (class method)">.<strong>parse_option</strong>(option) ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#parse_options-class_method" title="parse_options (class method)">.<strong>parse_options</strong>(options) ⇒ Object </a> </span> <span class="summary_desc"><div class='inline'></div></span> </li> </ul> <div id="class_method_details" class="method_details_list"> <h2>Class Method Details</h2> <div class="method_details first"> <h3 class="signature first" id="generate_completion-class_method"> .<strong>generate_completion</strong>(type: 'zsh', file: :default, link: true) ⇒ <tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt> </h3><div class="docstring"> <div class="discussion"> <p>Generate a completion script and output to file or stdout</p> </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> <span class='name'>type</span> <span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span> <em class="default">(defaults to: <tt>'zsh'</tt>)</em> — <div class='inline'><p>shell to generate for (zsh|bash|fish)</p> </div> </li> <li> <span class='name'>file</span> <span class='type'>(<tt><span class='object_link'><a href="../String.html" title="String (class)">String</a></span></tt>)</span> <em class="default">(defaults to: <tt>:default</tt>)</em> — <div class='inline'><p>Path to save to, or 'stdout'</p> </div> </li> </ul> </div> </div> <div class="method_details "> <h3 class="signature " id="get_help_sections-class_method"> .<strong>get_help_sections</strong>(command = "") ⇒ <tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt> </h3> </div> <div class="method_details "> <h3 class="signature " id="install_builtin-class_method"> .<strong>install_builtin</strong>(type) ⇒ <tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt> </h3> </div> <div class="method_details "> <h3 class="signature " id="link_default-class_method"> .<strong>link_default</strong>(type) ⇒ <tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt> </h3><div class="docstring"> <div class="discussion"> </div> </div> <div class="tags"> <p class="tag_title">Raises:</p> <ul class="raise"> <li> <span class='type'>(<tt>InvalidArgument</tt>)</span> </li> </ul> </div> </div> <div class="method_details "> <h3 class="signature " id="normalize_type-class_method"> .<strong>normalize_type</strong>(type) ⇒ <tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt> </h3> </div> <div class="method_details "> <h3 class="signature " id="parse_command-class_method"> .<strong>parse_command</strong>(command) ⇒ <tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt> </h3> </div> <div class="method_details "> <h3 class="signature " id="parse_commands-class_method"> .<strong>parse_commands</strong>(commands) ⇒ <tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt> </h3> </div> <div class="method_details "> <h3 class="signature " id="parse_option-class_method"> .<strong>parse_option</strong>(option) ⇒ <tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt> </h3> </div> <div class="method_details "> <h3 class="signature " id="parse_options-class_method"> .<strong>parse_options</strong>(options) ⇒ <tt><span class='object_link'><a href="../Object.html" title="Object (class)">Object</a></span></tt> </h3> </div> </div> </div> <div id="footer"> Generated on Sat Jul 1 12:43:13 2023 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.34 (ruby-3.2.0). </div> </div> </body> </html>