{"id":18907,"date":"2021-03-05T12:09:10","date_gmt":"2021-03-05T20:09:10","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/powershell\/?p=18907"},"modified":"2021-03-05T12:09:10","modified_gmt":"2021-03-05T20:09:10","slug":"announcing-psreadline-2-2-beta-2-with-dynamic-help","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/announcing-psreadline-2-2-beta-2-with-dynamic-help\/","title":{"rendered":"Announcing PSReadLine 2.2-beta.2 with Dynamic help"},"content":{"rendered":"<p>We are pleased to announce the new feature Dynamic Help in\n<a href=\"https:\/\/www.powershellgallery.com\/packages\/PSReadLine\/2.2.0-beta2\">PSReadLine 2.2.0-beta.2<\/a>.\nFeatures like <code>TabCompletetion<\/code> and the Help system make PowerShell easier to use. Expanding on that\ntheme, Dynamic Help provides just-in-time help at the command line. This experience allows you to\nstay focused on your work in the terminal without losing your place typing on the pipeline.<\/p>\n<h2>Supported Releases<\/h2>\n<p>Dynamic Help is implemented and presented through the PSReadLine module. In an effort to bring the\nbenefits of Dynamic Help to the most users, Dynamic Help is supported down-level to Windows\nPowerShell 5.1.<\/p>\n<p>PSReadLine 2.2.0-beta2, including Dynamic Help, is supported in the following versions:<\/p>\n<ul>\n<li>Windows PowerShell 5.1<\/li>\n<li>PowerShell 7.0+<\/li>\n<\/ul>\n<h2>Install PSReadLine with Dynamic Help<\/h2>\n<p>To receive the benefits of Dynamic Help, download and install the PSReadLine module from PSGallery.<\/p>\n<pre><code class=\"powershell\">Install-Module PSReadLine -AllowPrerelease\r\n<\/code><\/pre>\n<h2>Getting Cmdlet Help<\/h2>\n<p>Dynamic Help provides a view of full cmdlet help shown on an alternative screen buffer using a cross\nplatform Pager utility. PSReadLine maps the function <code>ShowCommandHelp<\/code> to the <code>F1<\/code> key.<\/p>\n<ul>\n<li>When the cursor is at the end of a fully expanded cmdlet, pressing <code>F1<\/code> displays the help for\nthat cmdlet.<\/li>\n<li>When the cursor is at the end of a fully expanded parameter, pressing <code>F1<\/code> displays the help\nbeginning at the parameter.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2021\/03\/DynHelp1.gif\"><img decoding=\"async\" class=\"alignnone wp-image-18912\" src=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2021\/03\/DynHelp1.gif\" alt=\"Image DynHelp1\" width=\"745\" height=\"443\" \/><\/a><\/p>\n<p>The Pager in PSReadLine supports viewing content one screen at a time. To navigate the displayed\nhelp content, press the up and down arrow keys to scroll the screen. Pressing <code>Q<\/code> exits the\nalternative screen buffer and returns to the current cursor location in the the primary screen\nbuffer.<\/p>\n<p>The Pager is a work in progress and we welcome your feedback and suggestions. To provide feedback\nand for more information, see the <a href=\"https:\/\/github.com\/PowerShell\/Pager\">Pager<\/a> repository on GitHub.<\/p>\n<h2>Focused Parameter Help<\/h2>\n<p>Pressing the <code>Alt-h<\/code> key combination provides dynamic help for parameters. The help is shown below\nthe current command line like <code>MenuComplete<\/code>. The cursor must be at the end of the fully-expanded\nparameter name when you press the <code>Alt-h<\/code> key.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2021\/03\/DynHelp-Alt-H.png\"><img decoding=\"async\" class=\"alignnone wp-image-18911\" src=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2021\/03\/DynHelp-Alt-H-300x67.png\" alt=\"Image DynHelp Alt H\" width=\"738\" height=\"165\" srcset=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2021\/03\/DynHelp-Alt-H-300x67.png 300w, https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2021\/03\/DynHelp-Alt-H-1024x228.png 1024w, https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2021\/03\/DynHelp-Alt-H-768x171.png 768w, https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2021\/03\/DynHelp-Alt-H-1536x342.png 1536w, https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2021\/03\/DynHelp-Alt-H-2048x455.png 2048w\" sizes=\"(max-width: 738px) 100vw, 738px\" \/><\/a><\/p>\n<p><div class=\"alert alert-primary\"><p class=\"alert-divider\"><i class=\"fabric-icon fabric-icon--Info\"><\/i><strong>Note<\/strong><\/p>The PSReadLine function <code>ShowParameterHelp<\/code> is bound to <code>Alt-h<\/code>.\nThe <code>Alt<\/code> bindings do not currently work on macOS as detailed in this\n<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/issues\/2242\">issue<\/a>. Mac users will need to map\n<code>ShowParameterHelp<\/code> function to an available key combination. <\/div><\/p>\n<pre><code class=\"powershell\">Set-PSReadLineKeyHandler -chord \"Ctrl-l\" -Function ShowParameterHelp\r\n<\/code><\/pre>\n<h2>Selection of Arguments<\/h2>\n<p>To rapidly select and change the arguments of a cmdlet without disturbing your syntax, press\n<code>Alt-a<\/code>. Selection of arguments is scoped within a script block. Based on the cursor position, it\nsearches from the innermost script block to the outmost script block, and stops when it finds any\narguments in a script block scope.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2021\/03\/dynhelpA.gif\"><img decoding=\"async\" class=\"alignnone wp-image-18921\" src=\"https:\/\/devblogs.microsoft.com\/powershell\/wp-content\/uploads\/sites\/30\/2021\/03\/dynhelpA.gif\" alt=\"Image dynhelpA\" width=\"743\" height=\"441\" \/><\/a><\/p>\n<p><div class=\"alert alert-primary\"><p class=\"alert-divider\"><i class=\"fabric-icon fabric-icon--Info\"><\/i><strong>Note<\/strong><\/p>The PSReadLine function <code>SelectCommandArgument<\/code> is bound to\n<code>Alt-a<\/code>. The <code>Alt<\/code> bindings do not currently work on macOS as detailed in this\n<a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\/issues\/2242\">issue<\/a>. Mac users will need to map\n<code>SelectCommandArgument<\/code> function to an available key combination. <\/div><\/p>\n<pre><code class=\"powershell\">Set-PSReadLineKeyHandler -chord \"Ctrl-k\" -function SelectCommandArgument\r\n<\/code><\/pre>\n<h2>Feedback and Support<\/h2>\n<p>Community feedback is essential to the iterative development of PSReadLine and features like Dynamic\nHelp. Thank you for your continued support and engagement. To file issues for PSReadLine or Dynamic\nHelp, please visit the <a href=\"https:\/\/github.com\/PowerShell\/PSReadLine\">PSReadLine<\/a> repository.<\/p>\n<p>Jason Helmick<\/p>\n<p>PowerShell Team<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are pleased to announce Dynamic Help, providing just-in-time help at the command line. Receive the help you need in the terminal without losing your place typing on the pipeline.<\/p>\n","protected":false},"author":7527,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[3170,248,3168],"class_list":["post-18907","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-announcement","tag-powershell","tag-psreadline"],"acf":[],"blog_post_summary":"<p>We are pleased to announce Dynamic Help, providing just-in-time help at the command line. Receive the help you need in the terminal without losing your place typing on the pipeline.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/18907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/7527"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=18907"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/18907\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=18907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=18907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=18907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}