{"id":124282,"date":"2026-11-18T19:56:35","date_gmt":"2026-11-18T11:56:35","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/124282.html"},"modified":"2026-11-18T19:56:35","modified_gmt":"2026-11-18T11:56:35","slug":"%e5%9c%a8%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%bb%88%e7%ab%af%e9%87%8c%e6%95%b2%e5%ae%8c%e4%b8%80%e6%9d%a1%e5%91%bd%e4%bb%a4%ef%bc%8c%e4%b8%8b%e4%b8%80%e6%9d%a1%e4%b8%ba%e4%bb%80%e4%b9%88%e5%b7%b2%e7%bb%8f","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/124282.html","title":{"rendered":"\u5728\u670d\u52a1\u5668\u7ec8\u7aef\u91cc\u6572\u5b8c\u4e00\u6761\u547d\u4ee4\uff0c\u4e0b\u4e00\u6761\u4e3a\u4ec0\u4e48\u5df2\u7ecf\u8865\u5728\u5149\u6807\u540e\u9762\uff1f"},"content":{"rendered":"<p>        \/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/<br \/>\n        #content_views .toc,<br \/>\n        \/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/<br \/>\n        #content_views.markdown_views &gt; p:empty:has(+ .toc),<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty,<br \/>\n        \/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/<br \/>\n        #content_views.htmledit_views #main-toc,<br \/>\n        #content_views.htmledit_views #hr-toc,<br \/>\n        #content_views.htmledit_views p[id*=\\&#8221;-toc\\&#8221;] {<br \/>\n          display: none !important;<br \/>\n        }<br \/>\n        \/* \u76ee\u5f55\u53bb\u6389\u540e\uff0c\u7d27\u8ddf\u7684\u9996\u4e2a\u6807\u9898\u4e0d\u518d\u591a\u51fa\u4e00\u5757\u4e0a\u8fb9\u8ddd *\/<br \/>\n        #content_views.markdown_views &gt; .toc + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + h4,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h4 {<br \/>\n          margin-top: 0 !important;<br \/>\n        }<\/p>\n<h2>\u5728\u670d\u52a1\u5668\u7ec8\u7aef\u91cc\u6572\u5b8c\u4e00\u6761\u547d\u4ee4&#xff0c;\u4e0b\u4e00\u6761\u4e3a\u4ec0\u4e48\u5df2\u7ecf\u8865\u5728\u5149\u6807\u540e\u9762&#xff1f;<\/h2>\n<p>SSH \u5230\u4e00\u53f0 Linux \u4e0a&#xff0c;git status \u521a\u8dd1\u5b8c&#xff0c;\u63d0\u793a\u7b26\u56de\u6765\u3002\u5149\u6807\u540e\u9762\u5df2\u7ecf\u6709\u4e00\u884c\u6d45\u8272\u7684 git diff\u3002\u90a3\u4e0d\u662f\u4f60\u6572\u8fdb\u53bb\u7684&#xff0c;\u56de\u8f66\u4e5f\u8fd8\u6ca1\u6309\u4e0b\u3002<\/p>\n<p>\u817e\u8baf\u4e91 OrcaTerm \u662f\u8fde\u5230\u4f60\u81ea\u5df1 Linux \u670d\u52a1\u5668\u7684\u7ec8\u7aef&#xff0c;Web \u7aef\u548c\u684c\u9762\u5ba2\u6237\u7aef\u90fd\u80fd\u5f00\u3002\u8fd9\u884c\u6d45\u8272\u5b57\u662f\u5b83\u7684\u547d\u4ee4\u9884\u6d4b\u3002\u6574\u6761\u94fe\u8def\u5206\u6210\u4e09\u6bb5&#xff1a;\u58f3\u7528 OSC \u4ea4\u51fa\u547d\u4ee4\u8fb9\u754c&#xff0c;\u5ba2\u6237\u7aef\u5728\u8fb9\u754c\u4e0a\u9884\u53d6\u4e00\u6574\u53e5&#xff0c;\u518d\u6309\u4f60\u6b64\u523b\u7684\u8f93\u5165\u4ece\u8fd9\u53e5\u91cc\u5207\u51fa\u540e\u7f00&#xff0c;\u753b\u8fdb\u5149\u6807\u6240\u5728\u7684\u683c\u5b50\u3002\u4f60\u6bcf\u6253\u4e00\u4e2a\u5b57&#xff0c;\u90fd\u4e0d\u4f1a\u518d\u53d1\u4e00\u6b21\u9884\u6d4b\u8bf7\u6c42\u3002<\/p>\n<h3>\u547d\u4ee4\u8fb9\u754c\u6765\u81ea\u94a9\u5b50&#xff0c;\u4e0d\u6765\u81ea\u7a7a\u95f2\u8ba1\u65f6<\/h3>\n<p>zsh \u91cc&#xff0c;preexec \u5728\u56de\u8f66\u4e4b\u540e\u3001\u547d\u4ee4\u5f00\u59cb\u4e4b\u524d\u8fd0\u884c&#xff1b;precmd \u5728\u4e0a\u4e00\u6761\u7ed3\u675f\u3001\u65b0\u63d0\u793a\u7b26\u6253\u51fa\u6765\u4e4b\u524d\u8fd0\u884c\u3002OrcaTerm \u7528 add-zsh-hook \u6ce8\u518c\u5177\u540d\u51fd\u6570&#xff0c;\u4e0d\u8986\u76d6\u4f60\u81ea\u5df1\u7684 preexec \/ precmd\u3002precmd \u7684\u7b2c\u4e00\u884c\u5c31\u628a $? \u5b58\u4e0b\u6765\u3002\u540e\u9762\u53ea\u8981\u518d\u8dd1\u5b50\u8fdb\u7a0b&#xff0c;\u9000\u51fa\u7801\u5c31\u4e0d\u662f\u521a\u624d\u90a3\u6761\u547d\u4ee4\u7684\u4e86\u3002<\/p>\n<p>\u8fd9\u4e24\u4e2a\u94a9\u5b50\u5404\u5199\u4e00\u6761 OSC 1337&#xff0c;BEL \u7ed3\u675f\u3002\u7ec8\u7aef\u534f\u8bae\u91cc OSC \u662f\u5e26\u5916\u5e8f\u5217&#xff0c;\u89e3\u6790\u5668\u5403\u6389&#xff0c;\u4e0d\u4f1a\u8fdb\u5c4f\u5e55\u7f13\u51b2\u3002<\/p>\n<p>ESC ] 1337 ; PreExecMarker ; git status BEL<br \/>\nESC ] 1337 ; PostExecMarker ; Exit&#061;0 ; CurrentDir&#061;\/home\/dev\/app BEL<\/p>\n<p>PreExecMarker \u540e\u9762\u662f\u4f60\u521a\u56de\u8f66\u7684\u90a3\u4e00\u884c&#xff0c;\u7ec8\u7aef\u7528\u5b83\u8bb0\u4e0b\u300c\u6b63\u5728\u8dd1\u7684\u547d\u4ee4\u300d\u3002PostExecMarker \u91cc\u7684 Exit \u662f\u521a\u624d\u5b58\u4e0b\u7684\u9000\u51fa\u7801&#xff0c;CurrentDir \u662f\u5f53\u65f6\u7684 $PWD\u3002\u63d0\u793a\u7b26\u518d\u88ab OSC 133 \u7684 PS \u548c PE \u5305\u4f4f&#xff0c;\u5ba2\u6237\u7aef\u624d\u77e5\u9053\u54ea\u4e00\u6bb5\u662f\u63d0\u793a\u7b26\u3001\u8f93\u5165\u533a\u4ece\u54ea\u4e00\u5217\u5f00\u59cb\u3002zsh \u91cc\u8fd9\u4e9b\u5b57\u8282\u5fc5\u987b\u7528 %{ %} \u5305\u8d77\u6765&#xff0c;\u5426\u5219\u7b97\u8fdb PS1 \u7684\u663e\u793a\u5bbd\u5ea6&#xff0c;Tab \u8865\u5168\u548c\u591a\u884c\u8f93\u5165\u7684\u5149\u6807\u4f1a\u9519\u4f4d\u3002oh-my-zsh\u3001powerlevel10k\u3001starship \u4f1a\u5728 precmd \u91cc\u91cd\u5199 PS1&#xff0c;\u6240\u4ee5\u5305\u88c5\u51fd\u6570\u4e5f\u6302\u5728 precmd \u4e0a&#xff0c;\u6bcf\u6b21\u753b\u63d0\u793a\u7b26\u4e4b\u524d\u628a\u6807\u8bb0\u8865\u56de\u53bb\u3002<\/p>\n<p>bash \u7528 PROMPT_COMMAND \u548c PS1 \u6253\u540c\u4e00\u7c7b\u6807\u8bb0\u3002\u684c\u9762\u5ba2\u6237\u7aef\u6253\u5f00\u672c\u673a\u7684 macOS \u6216 Linux \u7ec8\u7aef\u65f6&#xff0c;\u8fd9\u5957\u94a9\u5b50\u53ea\u6d3b\u5728\u5f53\u524d\u4f1a\u8bdd\u91cc&#xff0c;\u4e0d\u6539\u78c1\u76d8\u4e0a\u7684 ~\/.zshrc\u3002\u8fde\u8fdc\u7a0b Linux \u65f6&#xff0c;\u8981\u5728\u7ec8\u7aef\u91cc\u53f3\u952e&#xff0c;\u4ece\u589e\u5f3a\u529f\u80fd\u88c5\u4e0a\u811a\u672c&#xff0c;\u8fdc\u7a0b\u58f3\u624d\u4f1a\u53d1\u8fd9\u4e9b\u5e8f\u5217\u3002\u672c\u673a Windows \u7ec8\u7aef\u4e0d\u9884\u6d4b\u3002SSH \u6216 TAT \u8fde\u5230 Linux \u53ef\u4ee5\u3002\u5207\u5230 AI \u52a9\u624b\u6a21\u5f0f\u65f6\u9884\u6d4b\u505c\u6389&#xff0c;\u8f93\u5165\u7559\u7ed9\u5bf9\u8bdd\u3002<\/p>\n<p>\u7ec8\u7aef\u53ea\u6709\u5728\u9000\u51fa\u7801\u771f\u7684\u8bb0\u4e0b\u6765\u65f6\u624d\u628a\u8fd9\u6b21\u6267\u884c\u5f53\u6210\u4e00\u6761\u5b8c\u6210\u7684\u547d\u4ee4&#xff0c;\u5e76\u636e\u6b64\u53d1\u8d77\u9884\u6d4b\u3002\u5168\u5c4f\u7a0b\u5e8f\u8d70\u4e86\u5907\u7528\u5c4f\u5e55\u3001\u6216\u8005\u7ed3\u675f\u65f6\u6ca1\u6709\u9000\u51fa\u7801&#xff0c;\u8fd9\u6b21\u4e0d\u8bb0\u5165\u5386\u53f2&#xff0c;\u9884\u6d4b\u4e5f\u4e0d\u4f1a\u5f00\u59cb\u3002\u4e0b\u4e00\u6b21 PostExecMarker \u5230\u8fbe\u65f6&#xff0c;\u4e0a\u4e00\u8f6e\u8fd8\u6ca1\u753b\u51fa\u6765\u7684\u5019\u9009\u5148\u6e05\u6389\u3002\u65b0\u7ed3\u679c\u56de\u6765\u4e4b\u524d&#xff0c;\u5149\u6807\u540e\u9762\u4e0d\u4f1a\u5148\u95ea\u65e7\u7684\u90a3\u4e00\u53e5\u3002<\/p>\n<h3>\u9884\u53d6\u7684\u4e0a\u4e0b\u6587\u548c\u4f60\u6b63\u5728\u6253\u7684\u5b57\u662f\u4e24\u5957\u6570\u636e<\/h3>\n<p>\u8bf7\u6c42\u5728\u547d\u4ee4\u8bb0\u5b8c\u65f6\u53d1\u51fa&#xff0c;\u8f93\u5165\u56fa\u5b9a\u662f predict next terminal command\u3002\u771f\u6b63\u7684\u7ec8\u7aef\u72b6\u6001\u653e\u5728\u4e09\u4e2a\u5b57\u7b26\u4e32\u5b57\u6bb5\u91cc&#xff1a;systemContext\u3001currentTaskContext\u3001lastCommandFailure\u3002\u5f53\u524d\u8f93\u5165\u3001\u7ec8\u7aef\u5757\u3001\u539f\u59cb\u5386\u53f2\u8bb0\u5f55\u4e0d\u5728\u8fd9\u4efd\u8f7d\u8377\u91cc\u3002\u7f13\u5b58\u952e\u4e5f\u53ea\u7528\u8fd9\u4e09\u4e2a\u5b57\u6bb5&#xff0c;\u4e24\u5206\u949f\u5185\u540c\u4e00\u4efd\u4e0a\u4e0b\u6587\u4e0d\u518d\u8bf7\u6c42\u3002\u4e0a\u4e00\u6761\u547d\u4ee4\u5982\u679c\u5df2\u7ecf\u5199\u8fdb currentTaskContext \u7684\u6700\u540e\u4e00\u6761&#xff0c;\u5c31\u4e0d\u4f1a\u518d\u5355\u72ec\u9001\u4e00\u904d\u3002<\/p>\n<p>currentTaskContext \u6700\u591a 5 \u6761&#xff0c;\u4ece\u65e7\u5230\u65b0\u3002\u5386\u53f2\u91cc\u5148\u53bb\u6389\u6700\u540e\u4e00\u6761&#xff0c;\u518d\u53d6\u6700\u591a 4 \u6761&#xff0c;\u7136\u540e\u62fc\u4e0a\u521a\u521a\u7ed3\u675f\u7684\u90a3\u6761\u3002\u6700\u8fd1 3 \u6761\u53ef\u4ee5\u5e26\u8f93\u51fa&#xff0c;\u66f4\u65e9\u7684\u82e5\u672c\u8eab\u6709\u8f93\u51fa&#xff0c;\u5b57\u6bb5\u5199\u6210 outputOmitted: true&#xff0c;\u6b63\u6587\u4e0d\u5e26\u3002\u8fd9\u548c\u300c\u8f93\u51fa\u88ab\u622a\u65ad\u300d\u4e0d\u662f\u540c\u4e00\u4e2a\u6807\u8bb0\u3002\u622a\u65ad\u7528 outputTruncated: true&#xff0c;\u5e76\u5728\u6b63\u6587\u91cc\u5199\u660e\u7701\u6389\u4e86\u591a\u5c11\u5b57\u7b26\u3002\u7701\u6389\u7684\u662f\u4e2d\u95f4&#xff0c;\u5934\u5c3e\u90fd\u7559&#xff1a;\u5934\u5927\u7ea6\u5360\u9884\u7b97\u7684\u4e09\u6210&#xff0c;\u5c3e\u662f\u5269\u4e0b\u7684\u90e8\u5206\u3002\u6700\u65b0\u4e00\u6761\u7684\u9884\u7b97\u662f 4000 \u5b57\u7b26&#xff0c;\u66f4\u65e9\u90a3\u51e0\u6761\u662f 1000\u3002\u6a21\u578b\u88ab\u8981\u6c42\u628a\u7701\u7565\u5f53\u6210\u300c\u6ca1\u770b\u5230\u300d&#xff0c;\u4e0d\u80fd\u5f53\u6210\u8fd9\u6761\u547d\u4ee4\u6ca1\u6709\u8f93\u51fa\u3002<\/p>\n<p>\u51fa\u7ad9\u4e4b\u524d\u547d\u4ee4\u548c\u8f93\u51fa\u8d70\u4e0d\u540c\u7684\u6e05\u6d17\u3002\u547d\u4ee4\u884c\u6309 shell \u8bed\u6cd5\u62c6\u53c2\u6570&#xff0c;\u518d\u906e\u5bc6\u7801\u3001token \u8fd9\u4e00\u7c7b\u503c&#xff1b;\u8f93\u51fa\u53ea\u5265 CSI\u3001OSC&#xff0c;\u518d\u505a\u6587\u672c\u66ff\u6362&#xff0c;\u4e0d\u628a\u65e5\u5fd7\u5f53 shell \u53bb\u89e3\u6790\u3002\u8d85\u957f\u8f93\u51fa\u5148\u622a\u51fa\u4e00\u6bb5\u626b\u63cf\u7a97\u53e3\u518d\u8131\u654f&#xff0c;\u7a97\u53e3\u5916\u7684\u5185\u5bb9\u4e0d\u4f1a\u8fdb\u8bf7\u6c42\u3002\u76ee\u5f55\u53ea\u505a\u5bb6\u76ee\u5f55\u5f52\u7ea6&#xff1a;\/home\/&lt;\u7528\u6237&gt;\u3001\/Users\/&lt;\u7528\u6237&gt;\u3001C:\\\\Users\\\\&lt;\u7528\u6237&gt; \u6536\u6210 ~\u3002\u4e3b\u673a\u540d\u3001\u7528\u6237\u540d\u3001IP\u3001\u4f1a\u8bdd\u53f7\u4e0d\u8fdb\u4e0a\u4e0b\u6587\u3002\u8017\u65f6\u7528\u8d77\u6b62\u65f6\u95f4\u76f8\u51cf\u5f97\u5230 durationMs&#xff0c;\u539f\u59cb\u65f6\u95f4\u6233\u4e0d\u9001\u3002<\/p>\n<p>lastCommandFailure \u662f\u5ba2\u6237\u7aef\u81ea\u5df1\u4ece\u8f93\u51fa\u91cc\u5224\u7684&#xff0c;\u53ea\u8986\u76d6\u300c\u547d\u4ee4\u4e0d\u5b58\u5728\u300d\u3002\u9000\u51fa\u7801\u4e3a 0 \u65f6\u4e0d\u505a\u8fd9\u6b65\u3002\u5148\u53bb\u6389 ANSI&#xff0c;\u518d\u7528 bash\u3001zsh \u548c Windows \u7684 command not found \/ is not recognized \u53e5\u5f0f\u62bd\u51fa\u547d\u4ee4\u540d\u3002\u7ea0\u9519\u662f\u4e00\u4efd\u56fa\u5b9a\u547d\u4ee4\u8868\u4e0a\u7684\u7f16\u8f91\u8ddd\u79bb&#xff0c;\u8ddd\u79bb\u5927\u4e8e 1 \u5c31\u6ca1\u6709\u5efa\u8bae&#xff1b;\u672b\u5c3e\u591a\u6253\u7684\u6570\u5b57\u4f1a\u5148\u5265\u6389\u518d\u67e5\u8868&#xff0c;\u4f8b\u5982 grep1 \u5bf9\u4e0a grep\u3002\u8fd9\u4e2a\u5efa\u8bae\u548c\u6a21\u578b\u8fd4\u56de\u7684\u4e09\u53e5\u662f\u5206\u5f00\u7684&#xff0c;\u6a21\u578b\u53ea\u662f\u80fd\u5728\u4e0a\u4e0b\u6587\u91cc\u770b\u5230\u5b83\u3002<\/p>\n<p>\u6a21\u578b\u6309\u63a8\u8350\u987a\u5e8f\u56de 3 \u6761\u5b8c\u6574\u547d\u4ee4\u3002\u5ba2\u6237\u7aef\u4e22\u6389\u7a7a\u4e32\u3001\u548c\u5f53\u524d\u8f93\u5165\u5b8c\u5168\u76f8\u540c\u7684\u53e5\u5b50\u3001\u91cd\u590d\u9879&#xff0c;\u518d\u7528\u4e00\u7ec4\u6b63\u5219\u4e22\u6389\u9012\u5f52\u5f3a\u5236\u5220\u9664\u8fd9\u7c7b\u53e5\u5b50&#xff0c;\u6700\u540e\u7559\u4e0b\u6700\u591a 3 \u6761\u3002\u8fd9\u7ec4\u6b63\u5219\u4e0d\u662f shell \u8bed\u6cd5\u5206\u6790&#xff0c;\u5f15\u53f7\u3001\u547d\u4ee4\u66ff\u6362\u53ef\u4ee5\u7ed5\u8fc7\u5b83&#xff0c;\u6240\u4ee5\u5b83\u53ea\u51b3\u5b9a\u7070\u5b57\u51fa\u4e0d\u51fa\u73b0&#xff0c;\u4e0d\u4ee3\u66ff\u6267\u884c\u524d\u7684\u786e\u8ba4\u3002\u8fde\u7eed 3 \u6b21\u8d85\u65f6\u6216\u5931\u8d25\u4e4b\u540e&#xff0c;\u8fd9\u6b21\u4f1a\u8bdd\u4e0d\u518d\u53d1\u9884\u6d4b&#xff1b;\u4e00\u6b21\u6210\u529f\u6216\u4e00\u6b21\u7a7a\u7ed3\u679c\u628a\u8ba1\u6570\u6e05\u96f6\u3002\u5355\u6b21\u8bf7\u6c42 5 \u79d2\u5230\u70b9\u5c31\u4e2d\u6b62\u3002\u540e\u8fd4\u56de\u7684\u54cd\u5e94\u7528\u8bf7\u6c42\u5e8f\u53f7\u4e22\u6389&#xff0c;\u907f\u514d\u4e0a\u4e00\u6761\u547d\u4ee4\u7684 git diff \u753b\u5230\u4e0b\u4e00\u6761\u547d\u4ee4\u7684\u63d0\u793a\u7b26\u4e0a\u3002<\/p>\n<h3>\u7070\u5b57\u662f\u540e\u7f00&#xff0c;\u800c\u4e14\u8981\u548c PTY \u91cc\u7684\u8f93\u5165\u5bf9\u9f50<\/h3>\n<p>\u7a7a\u63d0\u793a\u7b26\u4e0a&#xff0c;\u7b2c\u4e00\u6761\u5019\u9009\u6574\u53e5\u753b\u51fa\u6765\u3002\u4f60\u5df2\u7ecf\u6253\u51fa\u5b57\u7b26\u4e4b\u540e&#xff0c;\u53ea\u5728\u5019\u9009\u4ee5\u8fd9\u6bb5\u5b57\u7b26\u5f00\u5934\u65f6&#xff0c;\u628a\u591a\u51fa\u6765\u7684\u540e\u7f00\u7559\u4e0b\u3002Linux \u4e0a\u533a\u5206\u5927\u5c0f\u5199\u3002Windows\u3001PowerShell\u3001cmd \u5148\u6309\u5c0f\u5199\u6bd4\u8f83&#xff0c;\u5207\u540e\u7f00\u65f6\u4ecd\u6309\u539f\u59cb\u5b57\u7b26\u4e32\u7684\u957f\u5ea6\u5207&#xff0c;\u6240\u4ee5\u8865\u51fa\u6765\u7684\u5927\u5c0f\u5199\u8fd8\u662f\u6a21\u578b\u5199\u7684\u90a3\u4e00\u7248\u3002\u5bf9\u4e0d\u4e0a\u5c31\u4ec0\u4e48\u90fd\u4e0d\u753b\u3002\u5339\u914d\u5168\u5728\u672c\u5730&#xff0c;\u5019\u9009\u5217\u8868\u4e0d\u53d8\u3002<\/p>\n<p>\u753b\u4e4b\u524d\u8fd8\u6709\u4e00\u9053\u548c\u7ec8\u7aef\u72b6\u6001\u7684\u6838\u5bf9\u3002\u547d\u4ee4\u6587\u672c\u5fc5\u987b\u548c\u4ea7\u751f\u8fd9\u6761\u5efa\u8bae\u65f6\u7684\u6587\u672c\u4e00\u81f4&#xff1b;\u8fd9\u6761\u547d\u4ee4\u8fd8\u4e0d\u80fd\u5df2\u7ecf\u6709\u8f93\u51fa&#xff1b;\u5149\u6807\u5fc5\u987b\u505c\u5728\u8f93\u5165\u533a\u672b\u5c3e&#xff1b;\u58f3\u81ea\u5df1\u7684\u8865\u5168\u6587\u672c\u5fc5\u987b\u662f\u7a7a\u7684\u3002\u952e\u5df2\u7ecf\u9001\u5230 PTY\u3001\u56de\u663e\u8fd8\u6ca1\u56de\u6765\u7684\u90a3\u51e0\u5341\u6beb\u79d2\u91cc&#xff0c;\u72b6\u6001\u8f6e\u8be2\u4ecd\u53ef\u80fd\u8bfb\u5230\u6309\u952e\u4e4b\u524d\u7684\u7a7a\u63d0\u793a\u7b26\u3002\u8fd9\u6bb5\u65f6\u95f4\u6807\u6210 pending&#xff0c;\u7070\u5b57\u5148\u5378\u6389&#xff0c;\u4e5f\u4e0d\u8bb8\u6162\u56de\u6765\u7684\u7a7a\u63d0\u793a\u7b26\u9884\u6d4b\u518d\u8d34\u4e0a\u53bb\u3002pending \u7684\u57fa\u7ebf\u662f\u6309\u952e\u524d\u90a3\u4e00\u7248\u8f93\u5165&#xff0c;\u56de\u663e\u4e00\u65e6\u548c\u57fa\u7ebf\u4e0d\u540c\u624d\u89e3\u9664\u3002<\/p>\n<p>\u63a5\u53d7\u4e4b\u540e\u4e5f\u6709\u540c\u6837\u7684\u7a97\u53e3\u3002\u53f3\u7bad\u5934\u628a\u540e\u7f00 sendData \u8fdb PTY&#xff0c;\u7ec8\u7aef\u91cc\u7684\u771f\u5b9e\u8f93\u5165\u8981\u7b49\u56de\u663e\u624d\u53d8\u957f\u3002\u5728\u771f\u5b9e\u8f93\u5165\u4ecd\u662f\u300c\u5df2\u63a5\u53d7\u7684\u90a3\u53e5\u300d\u7684\u524d\u7f00\u65f6&#xff0c;\u4e0d\u518d\u628a\u65e7\u540e\u7f00\u753b\u4e00\u6b21&#xff0c;\u5426\u5219 diff \u4f1a\u53e0\u4e24\u904d\u3002\u771f\u5b9e\u8f93\u5165\u504f\u79bb\u8fd9\u53e5\u4e4b\u540e&#xff0c;\u8fd9\u4e2a\u4fdd\u62a4\u624d\u53d6\u6d88\u3002<\/p>\n<p>\u7ed8\u5236\u7528\u7684\u662f xterm \u7684 decoration&#xff0c;\u6302\u5728\u5149\u6807 marker \u4e0a&#xff0c;\u4e0d\u53e6\u7b97\u4e00\u5c42\u50cf\u7d20\u5750\u6807\u3002\u771f\u6b63\u4e0b\u7b14\u524d\u518d\u770b\u5149\u6807\u90a3\u4e00\u683c&#xff1a;\u683c\u91cc\u5df2\u7ecf\u6709\u5b57\u7b26&#xff0c;\u5c31\u8ba4\u4e3a\u662f\u58f3\u7684\u5386\u53f2\u8865\u5168&#xff0c;\u8fd9\u6b21\u4e0d\u753b\u3002powerlevel10k \u7684\u53f3\u4fa7\u63d0\u793a\u7b26\u548c\u5149\u6807\u4e4b\u95f4\u662f\u7a7a\u683c&#xff0c;\u7a7a\u683c\u4e0d\u7b97\u8865\u5168&#xff0c;\u7070\u5b57\u4ecd\u53ef\u4ee5\u753b\u3002\u9ed8\u8ba4\u63a5\u53d7\u952e\u662f\u53f3\u7bad\u5934&#xff0c;\u7070\u5b57\u65c1\u8fb9\u53ef\u4ee5\u6539\u6210 Tab \u6216 Shift&#043;\u53f3\u7bad\u5934\u3002\u63a5\u53d7\u53ea\u9001\u540e\u7f00&#xff0c;\u4e0d\u9001\u56de\u8f66\u3002<\/p>\n<p>\u6240\u4ee5 git status \u540e\u9762\u90a3\u884c git diff&#xff0c;\u662f PostExecMarker \u89e6\u53d1\u7684\u4e00\u6b21\u9884\u53d6&#xff1b;\u4f60\u540e\u6765\u6253\u7684\u5b57\u53ea\u51b3\u5b9a\u8fd9\u53e5\u8fd8\u5269\u54ea\u4e00\u6bb5\u80fd\u653e\u5728\u5149\u6807\u540e\u9762\u3002\u547d\u4ee4\u8fd8\u5728\u8dd1\u3001\u6ca1\u6709\u9000\u51fa\u7801\u3001\u6216\u8005\u5149\u6807\u90a3\u4e00\u683c\u5df2\u7ecf\u88ab\u58f3\u5360\u4f4f&#xff0c;\u8fd9\u884c\u6d45\u8272\u5b57\u90fd\u4e0d\u4f1a\u51fa\u73b0\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261118115634-6afd92723b4b6.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>      <span id=\"quality-guide-article-end\" aria-hidden=\"true\" style=\"display:block;height:1px;margin-bottom:-1px\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content<\/p>\n","protected":false},"author":2,"featured_media":124281,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[77,43,44],"topic":[],"class_list":["post-124282","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-ssh","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728\u670d\u52a1\u5668\u7ec8\u7aef\u91cc\u6572\u5b8c\u4e00\u6761\u547d\u4ee4\uff0c\u4e0b\u4e00\u6761\u4e3a\u4ec0\u4e48\u5df2\u7ecf\u8865\u5728\u5149\u6807\u540e\u9762\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/124282.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728\u670d\u52a1\u5668\u7ec8\u7aef\u91cc\u6572\u5b8c\u4e00\u6761\u547d\u4ee4\uff0c\u4e0b\u4e00\u6761\u4e3a\u4ec0\u4e48\u5df2\u7ecf\u8865\u5728\u5149\u6807\u540e\u9762\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/124282.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-18T11:56:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261118115634-6afd92723b4b6.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/124282.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/124282.html\",\"name\":\"\u5728\u670d\u52a1\u5668\u7ec8\u7aef\u91cc\u6572\u5b8c\u4e00\u6761\u547d\u4ee4\uff0c\u4e0b\u4e00\u6761\u4e3a\u4ec0\u4e48\u5df2\u7ecf\u8865\u5728\u5149\u6807\u540e\u9762\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-11-18T11:56:35+00:00\",\"dateModified\":\"2026-11-18T11:56:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/124282.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/124282.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/124282.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728\u670d\u52a1\u5668\u7ec8\u7aef\u91cc\u6572\u5b8c\u4e00\u6761\u547d\u4ee4\uff0c\u4e0b\u4e00\u6761\u4e3a\u4ec0\u4e48\u5df2\u7ecf\u8865\u5728\u5149\u6807\u540e\u9762\uff1f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5728\u670d\u52a1\u5668\u7ec8\u7aef\u91cc\u6572\u5b8c\u4e00\u6761\u547d\u4ee4\uff0c\u4e0b\u4e00\u6761\u4e3a\u4ec0\u4e48\u5df2\u7ecf\u8865\u5728\u5149\u6807\u540e\u9762\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/124282.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5728\u670d\u52a1\u5668\u7ec8\u7aef\u91cc\u6572\u5b8c\u4e00\u6761\u547d\u4ee4\uff0c\u4e0b\u4e00\u6761\u4e3a\u4ec0\u4e48\u5df2\u7ecf\u8865\u5728\u5149\u6807\u540e\u9762\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content","og_url":"https:\/\/www.wsisp.com\/helps\/124282.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-11-18T11:56:35+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/11\/20261118115634-6afd92723b4b6.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/124282.html","url":"https:\/\/www.wsisp.com\/helps\/124282.html","name":"\u5728\u670d\u52a1\u5668\u7ec8\u7aef\u91cc\u6572\u5b8c\u4e00\u6761\u547d\u4ee4\uff0c\u4e0b\u4e00\u6761\u4e3a\u4ec0\u4e48\u5df2\u7ecf\u8865\u5728\u5149\u6807\u540e\u9762\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-11-18T11:56:35+00:00","dateModified":"2026-11-18T11:56:35+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/124282.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/124282.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/124282.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5728\u670d\u52a1\u5668\u7ec8\u7aef\u91cc\u6572\u5b8c\u4e00\u6761\u547d\u4ee4\uff0c\u4e0b\u4e00\u6761\u4e3a\u4ec0\u4e48\u5df2\u7ecf\u8865\u5728\u5149\u6807\u540e\u9762\uff1f"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/124282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=124282"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/124282\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/124281"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=124282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=124282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=124282"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=124282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}