{"id":1229,"date":"2024-11-10T11:23:13","date_gmt":"2024-11-10T03:23:13","guid":{"rendered":"https:\/\/fwq.ai\/blog\/1229\/"},"modified":"2024-11-10T11:23:13","modified_gmt":"2024-11-10T03:23:13","slug":"%e7%bd%91%e9%a1%b5%e7%89%88-shell-%e5%a6%82%e4%bd%95%e5%9c%a8%e6%b5%8f%e8%a7%88%e5%99%a8%e4%b8%ad%e5%ae%9e%e7%8e%b0%e5%91%bd%e4%bb%a4%e8%a1%8c%e5%8a%9f%e8%83%bd%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/1229\/","title":{"rendered":"\u7f51\u9875\u7248 Shell \u5982\u4f55\u5728\u6d4f\u89c8\u5668\u4e2d\u5b9e\u73b0\u547d\u4ee4\u884c\u529f\u80fd\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173033587233108.jpg\" class=\"aligncenter\" title=\"\u7f51\u9875\u7248 Shell \u5982\u4f55\u5728\u6d4f\u89c8\u5668\u4e2d\u5b9e\u73b0\u547d\u4ee4\u884c\u529f\u80fd\uff1f\u63d2\u56fe\" alt=\"\u7f51\u9875\u7248 Shell \u5982\u4f55\u5728\u6d4f\u89c8\u5668\u4e2d\u5b9e\u73b0\u547d\u4ee4\u884c\u529f\u80fd\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u7f51\u9875\u7248 shell \u7684\u8fd0\u4f5c\u539f\u7406\u53ca\u5176\u5f00\u6e90\u9009\u9879<\/strong><\/p>\n<p>\u7f51\u9875\u7248 Shell \u5141\u8bb8\u60a8\u5728\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee\u547d\u4ee4\u884c\uff0c\u5c31\u50cf\u5728\u7269\u7406\u673a\u4e0a\u4e00\u6837\u3002\u5b83\u65b9\u4fbf\u5730\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u6216\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u4e0a\u6267\u884c\u547d\u4ee4\u548c\u811a\u672c\u3002<\/p>\n<p><strong>\u539f\u7406<\/strong><\/p>\n<p>\u7f51\u9875\u7248 Shell \u7684\u8fd0\u4f5c\u539f\u7406\u662f\u5c06 Web \u8f93\u5165\u6307\u4ee4\u901a\u8fc7 WebSocket (WS) \u4f20\u8f93\u5230\u540e\u7aef\u3002\u540e\u7aef\u6267\u884c\u6307\u4ee4\uff0c\u7136\u540e\u5c06\u7ed3\u679c\u8fd4\u56de\u7ed9\u7f51\u9875\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u963f\u91cc\u4e91\u540e\u53f0\u7684\u7f51\u9875\u7248 Shell \u9075\u5faa\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ul>\n<li>\u7528\u6237\u8f93\u5165\u6307\u4ee4<\/li>\n<li>\u6d4f\u89c8\u5668\u5c06\u5176\u6253\u5305\u5e76\u901a\u8fc7 WS \u53d1\u9001\u5230\u670d\u52a1\u5668<\/li>\n<li>\u670d\u52a1\u5668\u6267\u884c\u6307\u4ee4\uff0c\u751f\u6210\u7ed3\u679c<\/li>\n<li>\u7ed3\u679c\u901a\u8fc7 WS \u8fd4\u56de\u7ed9\u6d4f\u89c8\u5668<\/li>\n<li>\u6d4f\u89c8\u5668\u89e3\u6790\u7ed3\u679c\u5e76\u663e\u793a\u5728\u7ec8\u7aef UI \u4e2d<\/li>\n<\/ul>\n<p><strong>\u5f00\u6e90\u9009\u9879<\/strong><\/p>\n<p>Xterm.js \u662f\u4e00\u4e2a\u6d41\u884c\u7684\u5f00\u6e90\u7f51\u9875\u7248 Shell \u5e93\uff0c\u88ab\u5e7f\u6cdb\u7528\u4e8e VS Code\u3001Hyper \u548c Theia \u7b49\u9879\u76ee\u4e2d\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u53ef\u6269\u5c55\u7684\u7ec8\u7aef\u4eff\u771f\u5668\uff0c\u5141\u8bb8\u60a8\u5728\u6d4f\u89c8\u5668\u4e2d\u521b\u5efa\u81ea\u5b9a\u4e49\u547d\u4ee4\u884c\u73af\u5883\u3002<\/p>\n<p>Xterm.js \u7684\u4e00\u4e9b\u4e3b\u8981\u7279\u6027\u5305\u62ec\uff1a<\/p>\n<ul>\n<li>\u53ef\u81ea\u5b9a\u4e49\u7684\u4e3b\u9898\u548c\u952e\u7ed1\u5b9a<\/li>\n<li>\u5bf9 UTF-8\u3001VT100 \u548c ANSI \u63a7\u5236\u5b57\u7b26\u7684\u652f\u6301<\/li>\n<li>\u6587\u672c\u81ea\u52a8\u5b8c\u6210\u529f\u80fd<\/li>\n<li>\u62d6\u653e\u652f\u6301<\/li>\n<\/ul>\n<p>\u4f7f\u7528\u50cf Xterm.js \u8fd9\u6837\u7684\u5f00\u6e90\u5de5\u5177\uff0c\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u8f7b\u677e\u5730\u5c06\u4ea4\u4e92\u5f0f Shell \u73af\u5883\u6574\u5408\u5230\u4ed6\u4eec\u7684 Web \u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u7f51\u9875\u7248 Shell \u5982\u4f55\u5728\u6d4f\u89c8\u5668\u4e2d\u5b9e\u73b0\u547d\u4ee4\u884c\u529f\u80fd\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7f51\u9875\u7248 shell \u7684\u8fd0\u4f5c\u539f\u7406\u53ca\u5176\u5f00\u6e90\u9009\u9879 \u7f51\u9875\u7248 Shell \u5141\u8bb8\u60a8\u5728\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee\u547d\u4ee4\u884c\uff0c\u5c31\u50cf\u5728\u7269\u7406\u673a\u4e0a\u4e00\u6837\u3002\u5b83\u65b9\u4fbf\u5730\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u6216\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u4e0a\u6267\u884c\u547d\u4ee4\u548c\u811a\u672c\u3002 \u539f\u7406 \u7f51\u9875\u7248 Shell \u7684\u8fd0\u4f5c\u539f\u7406\u662f\u5c06 Web \u8f93\u5165\u6307\u4ee4\u901a\u8fc7 WebSocket (WS) \u4f20\u8f93\u5230\u540e\u7aef\u3002\u540e\u7aef\u6267\u884c\u6307\u4ee4\uff0c\u7136\u540e\u5c06\u7ed3\u679c\u8fd4\u56de\u7ed9\u7f51\u9875\u3002 \u4f8b\u5982\uff0c\u963f\u91cc\u4e91\u540e\u53f0\u7684\u7f51\u9875\u7248 Shell \u9075\u5faa\u4ee5\u4e0b\u6b65\u9aa4\uff1a \u7528\u6237\u8f93\u5165\u6307\u4ee4 \u6d4f\u89c8\u5668\u5c06\u5176\u6253\u5305\u5e76\u901a\u8fc7 WS \u53d1\u9001\u5230\u670d\u52a1\u5668 \u670d\u52a1\u5668\u6267\u884c\u6307\u4ee4\uff0c\u751f\u6210\u7ed3\u679c \u7ed3\u679c\u901a\u8fc7 WS \u8fd4\u56de\u7ed9\u6d4f\u89c8\u5668 \u6d4f\u89c8\u5668\u89e3\u6790\u7ed3\u679c\u5e76\u663e\u793a\u5728\u7ec8\u7aef UI \u4e2d \u5f00\u6e90\u9009\u9879 Xterm.js \u662f\u4e00\u4e2a\u6d41\u884c\u7684\u5f00\u6e90\u7f51\u9875\u7248 Shell \u5e93\uff0c\u88ab\u5e7f\u6cdb\u7528\u4e8e VS Code\u3001Hyper \u548c Theia \u7b49\u9879\u76ee\u4e2d\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u53ef\u6269\u5c55\u7684\u7ec8\u7aef\u4eff\u771f\u5668\uff0c\u5141\u8bb8\u60a8\u5728\u6d4f\u89c8\u5668\u4e2d\u521b\u5efa\u81ea\u5b9a\u4e49\u547d\u4ee4\u884c\u73af\u5883\u3002 Xterm.js \u7684\u4e00\u4e9b\u4e3b\u8981\u7279\u6027\u5305\u62ec\uff1a \u53ef\u81ea\u5b9a\u4e49\u7684\u4e3b\u9898\u548c\u952e\u7ed1\u5b9a \u5bf9 UTF-8\u3001VT100 \u548c ANSI \u63a7\u5236\u5b57\u7b26\u7684\u652f\u6301 \u6587\u672c\u81ea\u52a8\u5b8c\u6210\u529f\u80fd \u62d6\u653e\u652f\u6301 \u4f7f\u7528\u50cf Xterm.js \u8fd9\u6837\u7684\u5f00\u6e90\u5de5\u5177\uff0c\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u8f7b\u677e\u5730\u5c06\u4ea4\u4e92\u5f0f Shell \u73af\u5883\u6574\u5408\u5230\u4ed6\u4eec\u7684 Web [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-1229","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=1229"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1229\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=1229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=1229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=1229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}