{"id":167,"date":"2026-09-24T19:44:45","date_gmt":"2026-09-24T11:44:45","guid":{"rendered":"https:\/\/blog.leawsic.ltd\/?post_type=shuoshuo&#038;p=167"},"modified":"2026-09-25T15:26:34","modified_gmt":"2026-09-25T07:26:34","slug":"powershell-7-%e8%a1%a5%e5%85%a8%e6%8c%89%e9%94%ae%e8%ae%be%e7%bd%ae","status":"publish","type":"shuoshuo","link":"https:\/\/blog.leawsic.ltd\/index.php\/shuoshuo\/powershell-7-%e8%a1%a5%e5%85%a8%e6%8c%89%e9%94%ae%e8%ae%be%e7%bd%ae\/","title":{"rendered":"PowerShell 7 \u8865\u5168\u6309\u952e\u8bbe\u7f6e"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>\u64cd\u4f5c\u6b65\u9aa4<\/strong>\uff1a<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>\u6253\u5f00\u914d\u7f6e\u6587\u4ef6<\/strong>\uff1a\u5728 PowerShell \u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u7528\u8bb0\u4e8b\u672c\u6253\u5f00\u5f53\u524d\u7528\u6237\u7684\u914d\u7f6e\u6587\u4ef6\u3002<code>notepad $PROFILE<\/code> \u5982\u679c\u63d0\u793a\u6587\u4ef6\u4e0d\u5b58\u5728\uff0c\u53ef\u4ee5\u624b\u52a8\u521b\u5efa\u5b83\u3002<\/li>\n\n\n\n<li><strong>\u6dfb\u52a0\u914d\u7f6e\u4ee3\u7801<\/strong>\uff1a\u5728\u6253\u5f00\u7684\u6587\u4ef6\u4e2d\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<code># \u5c06\u53f3\u65b9\u5411\u952e\u8bbe\u7f6e\u4e3a\u9010\u8bcd\u63a5\u53d7\u5efa\u8bae Set-PSReadLineKeyHandler -Key RightArrow -Function AcceptNextSuggestionWord<\/code><\/li>\n\n\n\n<li>\u5982\u679c\u4f60\u8fd8\u5e0c\u671b\u4fdd\u7559\u201c<strong>Tab \u952e\u63a5\u53d7\u6574\u884c\u5efa\u8bae<\/strong>\u201d\u7684\u4e60\u60ef\uff0c\u53ef\u4ee5\u540c\u65f6\u6dfb\u52a0\uff1a<code># \u5c06 Tab \u952e\u8bbe\u7f6e\u4e3a\u63a5\u53d7\u6574\u884c\u5efa\u8bae Set-PSReadLineKeyHandler -Key Tab -Function AcceptSuggestion<\/code><\/li>\n\n\n\n<li><strong>\u4fdd\u5b58\u5e76\u751f\u6548<\/strong>\uff1a\u4fdd\u5b58\u6587\u4ef6\u5e76\u5173\u95ed\u8bb0\u4e8b\u672c\u3002\u7136\u540e\uff0c\u91cd\u65b0\u542f\u52a8 PowerShell\uff0c\u6216\u5728\u5f53\u524d\u4f1a\u8bdd\u4e2d\u8fd0\u884c <code>. $PROFILE<\/code> \u6765\u4f7f\u914d\u7f6e\u7acb\u5373\u751f\u6548\u3002<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Tips\uff1a\u5982\u679c\u4e0d\u77e5\u9053\u914d\u7f6e\u6587\u4ef6\u9ed8\u8ba4\u4fdd\u5b58\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u8fd0\u884c <code>$PROFILE<\/code> \u67e5\u770b<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tab\u7ed1\u5b9a\u5230\u201c\u63a5\u53d7\u6574\u884c\u5efa\u8bae\u201d\u7684\u884c\u4e3a\u540e\uff0c\u539f\u5148\u7684Tab\u8f6e\u8be2\u6587\u4ef6\u540d\u7684\u529f\u80fd\u5c31\u5931\u6548\u4e86\uff0c\u53ef\u4ee5\u901a\u8fc7\u6362\u7ed1\u89e3\u51b3\uff0c\u63a8\u8350Alt+\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"emotion":"","emotion_color":"","title_style":"","license":""},"categories":[2],"class_list":["post-167","shuoshuo","type-shuoshuo","status-publish","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/blog.leawsic.ltd\/index.php\/wp-json\/wp\/v2\/shuoshuo\/167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.leawsic.ltd\/index.php\/wp-json\/wp\/v2\/shuoshuo"}],"about":[{"href":"https:\/\/blog.leawsic.ltd\/index.php\/wp-json\/wp\/v2\/types\/shuoshuo"}],"author":[{"embeddable":true,"href":"https:\/\/blog.leawsic.ltd\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.leawsic.ltd\/index.php\/wp-json\/wp\/v2\/comments?post=167"}],"wp:attachment":[{"href":"https:\/\/blog.leawsic.ltd\/index.php\/wp-json\/wp\/v2\/media?parent=167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.leawsic.ltd\/index.php\/wp-json\/wp\/v2\/categories?post=167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}