{"id":131,"date":"2025-08-30T20:55:41","date_gmt":"2025-08-30T12:55:41","guid":{"rendered":"https:\/\/caoxunyi.cn\/?p=131"},"modified":"2025-08-30T20:57:54","modified_gmt":"2025-08-30T12:57:54","slug":"arch-linux-%e7%bb%88%e7%ab%af%e7%be%8e%e5%8c%96%e4%b8%8e%e6%95%88%e7%8e%87%e5%b7%a5%e5%85%b7%e9%85%8d%e7%bd%ae%e6%8c%87%e5%8d%97%ef%bc%9astarship-%e4%b8%8e-yazi","status":"publish","type":"post","link":"https:\/\/caoxunyi.cn\/index.php\/131\/","title":{"rendered":"Arch Linux \u7ec8\u7aef\u7f8e\u5316\u4e0e\u6548\u7387\u5de5\u5177\u914d\u7f6e\u6307\u5357\uff1aStarship \u4e0e Yazi"},"content":{"rendered":"<h2>\u524d\u8a00<\/h2>\n<p>\u672c\u6307\u5357\u5c06\u6574\u5408\u4e24\u4e2a\u5f3a\u5927\u7684\u7ec8\u7aef\u5de5\u5177\u2014\u2014Starship \u548c Yazi\u2014\u2014\u7684\u5b89\u88c5\u4e0e\u914d\u7f6e\u6d41\u7a0b\uff0c\u5e2e\u52a9\u4f60\u5c06 Arch Linux \u7684\u7ec8\u7aef\u4f53\u9a8c\u63d0\u5347\u5230\u4e00\u4e2a\u65b0\u7684\u6c34\u5e73\u3002Starship \u80fd\u591f\u4e3a\u4f60\u63d0\u4f9b\u4e00\u4e2a\u7f8e\u89c2\u3001\u4fe1\u606f\u4e30\u5bcc\u7684\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u800c Yazi \u5219\u662f\u4e00\u4e2a\u9ad8\u6548\u3001\u5e26\u9884\u89c8\u529f\u80fd\u7684\u7ec8\u7aef\u6587\u4ef6\u7ba1\u7406\u5668\u3002<\/p>\n<hr \/>\n<h2>\u7b2c\u4e00\u90e8\u5206\uff1aStarship - \u9ad8\u5ea6\u53ef\u5b9a\u5236\u7684\u7ec8\u7aef\u63d0\u793a\u7b26<\/h2>\n<p>Starship \u662f\u4e00\u4e2a\u7528 Rust \u7f16\u5199\u7684\u3001\u901f\u5ea6\u6781\u5feb\u3001\u9ad8\u5ea6\u53ef\u5b9a\u5236\u7684\u7ec8\u7aef\u63d0\u793a\u7b26\u3002\u5b83\u80fd\u591f\u5728\u4f60\u7684\u547d\u4ee4\u884c\u4e2d\uff0c\u6839\u636e\u5f53\u524d\u76ee\u5f55\u548c\u73af\u5883\uff0c\u667a\u80fd\u5730\u663e\u793a Git \u5206\u652f\u3001\u9879\u76ee\u7248\u672c\u53f7\u7b49\u5173\u952e\u4fe1\u606f\u3002\n<figure id=\"attachment_mmd_132\" class=\"wp-block-image alignnone\"><img width=\"571\" height=\"100\" src=\"https:\/\/caoxunyi.cn\/wp-content\/uploads\/2025\/08\/1756558443-477928feb778a68cba6efdb746447def.png\" class=\"attachment-700x100 size-700x100\" alt=\"1756558443-477928feb778a68cba6efdb746447def\" decoding=\"async\" loading=\"lazy\" align=\"none\" srcset=\"https:\/\/caoxunyi.cn\/wp-content\/uploads\/2025\/08\/1756558443-477928feb778a68cba6efdb746447def.png 748w, https:\/\/caoxunyi.cn\/wp-content\/uploads\/2025\/08\/1756558443-477928feb778a68cba6efdb746447def-300x53.png 300w\" sizes=\"auto, (max-width: 571px) 100vw, 571px\" \/><\/figure>\n<h3>1.1 \u5b89\u88c5\u5b57\u4f53 (\u83b7\u53d6\u56fe\u6807\u652f\u6301)<\/h3>\n<p>Starship \u4f7f\u7528\u4e86\u8bb8\u591a Nerd Font \u5b57\u4f53\u5e93\u4e2d\u7684\u7279\u6b8a\u56fe\u6807\u3002\u4e3a\u4e86\u80fd\u6b63\u5e38\u663e\u793a\u8fd9\u4e9b\u56fe\u6807\uff0c\u800c\u4e0d\u662f\u4e71\u7801\u65b9\u5757\uff0c\u6211\u4eec\u5fc5\u987b\u5148\u5b89\u88c5\u5e76\u914d\u7f6e\u4e00\u6b3e Nerd Font \u5b57\u4f53\u3002<\/p>\n<h4>1.1.1 \u5b89\u88c5\u5b57\u4f53\u5305<\/h4>\n<p><code>FiraCode Nerd Font<\/code> \u662f\u4e00\u6b3e\u4f18\u79c0\u4e14\u5e38\u7528\u7684\u9009\u62e9\u3002<\/p>\n<pre><code class=\"lang-bash language-bash bash\">sudo pacman -S ttf-firacode-nerd<\/code><\/pre>\n<h4>1.1.2 \u5237\u65b0\u7cfb\u7edf\u5b57\u4f53\u7f13\u5b58<\/h4>\n<p>\u4e3a\u4e86\u8ba9\u7cfb\u7edf\u80fd\u7acb\u523b\u8bc6\u522b\u5230\u65b0\u5b89\u88c5\u7684\u5b57\u4f53\uff0c\u9700\u8981\u624b\u52a8\u5237\u65b0\u5b57\u4f53\u7f13\u5b58\u3002<\/p>\n<pre><code class=\"lang-bash language-bash bash\">fc-cache -fv<\/code><\/pre>\n<h4>1.1.3 \u5728\u7ec8\u7aef\u6a21\u62df\u5668\u4e2d\u914d\u7f6e\u5b57\u4f53<\/h4>\n<p>\u8fd9\u662f\u6700\u5173\u952e\u7684\u4e00\u6b65\u3002\u4f60\u9700\u8981<strong>\u6253\u5f00\u4f60\u6240\u4f7f\u7528\u7684\u7ec8\u7aef\u8f6f\u4ef6\uff08\u5982 Konsole\uff09\u7684\u8bbe\u7f6e<\/strong>\uff0c\u5e76\u5c06\u5b57\u4f53\u66f4\u6539\u4e3a <code>FiraCode Nerd Font<\/code>\u3002<\/p>\n<figure id=\"attachment_mmd_133\" class=\"wp-block-image alignnone\"><img width=\"700\" height=\"828\" src=\"https:\/\/caoxunyi.cn\/wp-content\/uploads\/2025\/08\/1756558448-17d7a5d47322ac50cf9ea3e42a44d52c.png\" class=\"attachment-700x1000 size-700x1000\" alt=\"1756558448-17d7a5d47322ac50cf9ea3e42a44d52c\" decoding=\"async\" loading=\"lazy\" align=\"none\" srcset=\"https:\/\/caoxunyi.cn\/wp-content\/uploads\/2025\/08\/1756558448-17d7a5d47322ac50cf9ea3e42a44d52c.png 927w, https:\/\/caoxunyi.cn\/wp-content\/uploads\/2025\/08\/1756558448-17d7a5d47322ac50cf9ea3e42a44d52c-254x300.png 254w, https:\/\/caoxunyi.cn\/wp-content\/uploads\/2025\/08\/1756558448-17d7a5d47322ac50cf9ea3e42a44d52c-865x1024.png 865w, https:\/\/caoxunyi.cn\/wp-content\/uploads\/2025\/08\/1756558448-17d7a5d47322ac50cf9ea3e42a44d52c-768x909.png 768w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n<p>\u4ee5 <strong>Konsole<\/strong> \u4e3a\u4f8b\uff1a<\/p>\n<ol>\n<li>\u6253\u5f00 Konsole\u3002<\/li>\n<li>\u70b9\u51fb\u83dc\u5355\u680f <code>\u8bbe\u7f6e<\/code> -> <code>\u7f16\u8f91\u5f53\u524d\u65b9\u6848...<\/code>\u3002<\/li>\n<li>\u9009\u62e9 <code>\u5916\u89c2<\/code> \u6807\u7b7e\u9875\uff0c\u70b9\u51fb <code>\u9009\u62e9\u5b57\u4f53...<\/code>\u3002<\/li>\n<li>\u5728\u5b57\u4f53\u5217\u8868\u4e2d\u641c\u7d22\u5e76\u9009\u4e2d <code>FiraCode Nerd Font<\/code>\u3002<\/li>\n<li>\u70b9\u51fb <code>\u786e\u5b9a<\/code> \u548c <code>\u5e94\u7528<\/code> \u4fdd\u5b58\u8bbe\u7f6e\u3002<\/li>\n<\/ol>\n<h3>1.2 \u5b89\u88c5 Starship<\/h3>\n<p>Starship \u4e3b\u7a0b\u5e8f\u53ef\u4ee5\u76f4\u63a5\u4ece Arch \u5b98\u65b9\u4ed3\u5e93\u5b89\u88c5\u3002<\/p>\n<pre><code class=\"lang-bash language-bash bash\">sudo pacman -S starship<\/code><\/pre>\n<h3>1.3 \u5728 Shell \u4e2d\u542f\u7528 Starship<\/h3>\n<p>\u4e3a\u4e86\u8ba9 Starship \u80fd\u591f\u63a5\u7ba1\u9ed8\u8ba4\u7684\u7ec8\u7aef\u63d0\u793a\u7b26\uff0c\u9700\u8981\u5728\u4f60\u7684 Shell \u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4e00\u884c\u542f\u52a8\u547d\u4ee4\u3002<strong>\u8fd9\u4e00\u6b65\u662f\u8ba9\u914d\u7f6e\u6c38\u4e45\u751f\u6548\u7684\u5173\u952e<\/strong>\u3002<\/p>\n<h4>1.3.1 \u786e\u8ba4\u4f60\u7684 Shell<\/h4>\n<p>\u9996\u5148\uff0c\u786e\u8ba4\u4f60\u5f53\u524d\u4f7f\u7528\u7684 Shell \u7c7b\u578b\u3002<\/p>\n<pre><code class=\"lang-bash language-bash bash\">echo $SHELL<\/code><\/pre>\n<p>\u672c\u6559\u7a0b\u4ee5\u6700\u5e38\u89c1\u7684 <code>\/bin\/bash<\/code> \u4e3a\u4f8b\u3002<\/p>\n<h4>1.3.2 \u6dfb\u52a0\u914d\u7f6e\u5230 <code>.bashrc<\/code><\/h4>\n<p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5c06 Starship \u7684\u542f\u52a8\u811a\u672c\u81ea\u52a8\u8ffd\u52a0\u5230 Bash \u7684\u914d\u7f6e\u6587\u4ef6\u672b\u5c3e\u3002<\/p>\n<pre><code class=\"lang-bash language-bash bash\">echo 'eval &quot;$(starship init bash)&quot;' &gt;&gt; ~\/.bashrc<\/code><\/pre>\n<p>\u6dfb\u52a0\u5b8c\u6210\u540e\uff0c<strong>\u5b8c\u5168\u5173\u95ed\u5e76\u91cd\u65b0\u6253\u5f00\u4f60\u7684\u7ec8\u7aef\u7a97\u53e3<\/strong>\uff0cStarship \u63d0\u793a\u7b26\u5c31\u4f1a\u81ea\u52a8\u751f\u6548\u4e86\u3002<\/p>\n<h3>1.4 (\u53ef\u9009) \u4e2a\u6027\u5316\u4f60\u7684 Starship<\/h3>\n<p>\u4f60\u53ef\u4ee5\u901a\u8fc7\u521b\u5efa\u4e00\u4e2a TOML \u683c\u5f0f\u7684\u914d\u7f6e\u6587\u4ef6\u6765\u8fdb\u884c\u9ad8\u5ea6\u5b9a\u5236\u3002<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u914d\u7f6e\u6587\u4ef6<\/strong>\uff1a<\/p>\n<pre><code class=\"lang-bash language-bash bash\">mkdir -p ~\/.config &amp;&amp; touch ~\/.config\/starship.toml<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6<\/strong>\uff1a<\/p>\n<pre><code class=\"lang-bash language-bash bash\">nano ~\/.config\/starship.toml<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>\u6dfb\u52a0\u81ea\u5b9a\u4e49\u914d\u7f6e<\/strong>\uff1a\n\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\uff0c\u5b83\u4fee\u6539\u4e86\u63d0\u793a\u7b26\u7684\u7ed3\u675f\u7b26\u53f7\uff0c\u5e76\u8bbe\u7f6e\u4e3b\u673a\u540d\u4ec5\u5728 SSH \u8fde\u63a5\u65f6\u663e\u793a\u3002<\/p>\n<pre><code class=\"lang-toml language-toml toml\"># ~\/.config\/starship.toml\n\n# \u4fee\u6539\u547d\u4ee4\u6210\u529f\u6216\u5931\u8d25\u65f6\u663e\u793a\u7684\u7b26\u53f7\n[character]\nsuccess_symbol = &quot;[\u279c](bold green)&quot;\nerror_symbol = &quot;[\u2717](bold red)&quot;\n\n# \u9ed8\u8ba4\u9690\u85cf\u4e3b\u673a\u540d\uff0c\u4ec5\u5728 SSH \u8fdc\u7a0b\u8fde\u63a5\u65f6\u663e\u793a\n[hostname]\nssh_only = true\ndisabled = false<\/code><\/pre>\n<p>\u4fdd\u5b58\u6587\u4ef6\u540e\uff0c\u65b0\u914d\u7f6e\u4f1a\u7acb\u5373\u5728\u65b0\u7684\u7ec8\u7aef\u63d0\u793a\u7b26\u4e0a\u751f\u6548\u3002\u66f4\u591a\u53ef\u7528\u7684\u914d\u7f6e\u9879\u53ef\u4ee5\u67e5\u9605 <a href=\"https:\/\/starship.rs\/config\/\" target=\"_blank\"  rel=\"nofollow\" >Starship \u5b98\u65b9\u6587\u6863<\/a>\u3002<\/p>\n<\/li>\n<\/ol>\n<hr \/>\n<h2>\u7b2c\u4e8c\u90e8\u5206\uff1aYazi - \u9ad8\u6548\u7684\u7ec8\u7aef\u6587\u4ef6\u7ba1\u7406\u5668<\/h2>\n<p>\u672c\u90e8\u5206\u65e8\u5728\u8bb0\u5f55\u5728 Arch Linux \u4e0a\u5b89\u88c5\u548c\u914d\u7f6e <code>Yazi<\/code> \u7684\u5b8c\u6574\u8fc7\u7a0b\u3002\u7279\u522b\u9488\u5bf9\u901a\u8fc7 <code>pacman<\/code> \u5b89\u88c5\u540e\u53ef\u80fd\u9047\u5230\u7684<strong>\u65e7\u7248\u672c Yazi<\/strong> \u7684\u60c5\u51b5\uff0c\u8be5\u7248\u672c<strong>\u6ca1\u6709\u81ea\u52a8\u751f\u6210\u914d\u7f6e\u6587\u4ef6\u7684\u547d\u4ee4<\/strong>\uff0c\u4e14\u90e8\u5206<strong>\u914d\u7f6e\u9879\u4e0e\u65b0\u7248\u672c\u4e0d\u540c<\/strong>\u3002\u672c\u6307\u5357\u5c06\u63d0\u4f9b\u4e00\u5957\u786e\u4fdd\u53ef\u4ee5\u6210\u529f\u914d\u7f6e\u7684\u201c\u624b\u52a8\u6321\u201d\u65b9\u6848\u3002<\/p>\n<figure id=\"attachment_mmd_134\" class=\"wp-block-image alignnone\"><img width=\"900\" height=\"600\" src=\"https:\/\/caoxunyi.cn\/wp-content\/uploads\/2025\/08\/1756558453-3fd33aac83f8016d2cde386e28dad287-1024x681.png\" class=\"attachment-900x600 size-900x600\" alt=\"1756558453-3fd33aac83f8016d2cde386e28dad287\" decoding=\"async\" loading=\"lazy\" align=\"none\" srcset=\"https:\/\/caoxunyi.cn\/wp-content\/uploads\/2025\/08\/1756558453-3fd33aac83f8016d2cde386e28dad287-1024x681.png 1024w, https:\/\/caoxunyi.cn\/wp-content\/uploads\/2025\/08\/1756558453-3fd33aac83f8016d2cde386e28dad287-300x200.png 300w, https:\/\/caoxunyi.cn\/wp-content\/uploads\/2025\/08\/1756558453-3fd33aac83f8016d2cde386e28dad287-768x511.png 768w, https:\/\/caoxunyi.cn\/wp-content\/uploads\/2025\/08\/1756558453-3fd33aac83f8016d2cde386e28dad287.png 1387w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/figure>\n<h3>2.1 \u5b89\u88c5<\/h3>\n<h4>2.1.1 \u5b89\u88c5 Yazi \u4e3b\u7a0b\u5e8f<\/h4>\n<p>Yazi \u4f4d\u4e8e Arch Linux \u7684\u5b98\u65b9\u8f6f\u4ef6\u4ed3\u5e93\u4e2d\uff0c\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7 <code>pacman<\/code> \u5b89\u88c5\u3002<\/p>\n<pre><code class=\"lang-bash language-bash bash\">sudo pacman -S yazi<\/code><\/pre>\n<h4>2.1.2 \u5b89\u88c5\u9884\u89c8\u529f\u80fd\u4f9d\u8d56<\/h4>\n<p>\u4e3a\u4e86\u8ba9 Yazi \u80fd\u591f\u9884\u89c8\u56fe\u7247\u3001\u89c6\u9891\u3001PDF\u3001\u538b\u7f29\u5305\u7b49\u6587\u4ef6\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5\u4e00\u7cfb\u5217\u7684\u4f9d\u8d56\u5de5\u5177\u3002<\/p>\n<p><strong>\u4ece\u5b98\u65b9\u4ed3\u5e93\u5b89\u88c5\uff1a<\/strong><\/p>\n<pre><code class=\"lang-bash language-bash bash\">sudo pacman -S p7zip ffmpegthumbnailer poppler bat ueberzugpp<\/code><\/pre>\n<ul>\n<li><code>p7zip<\/code>: \u7528\u4e8e\u9884\u89c8\u538b\u7f29\u6587\u4ef6\uff08.7z, .zip, .rar \u7b49\uff09\u3002<\/li>\n<li><code>ffmpegthumbnailer<\/code>: \u7528\u4e8e\u751f\u6210\u89c6\u9891\u6587\u4ef6\u7684\u7f29\u7565\u56fe\u3002<\/li>\n<li><code>poppler<\/code>: \u7528\u4e8e\u9884\u89c8 PDF \u6587\u4ef6\u3002<\/li>\n<li><code>bat<\/code>: \u7528\u4e8e\u4ee3\u7801\u6587\u4ef6\u8bed\u6cd5\u9ad8\u4eae\u3002<\/li>\n<li><code>ueberzugpp<\/code>: \u7528\u4e8e\u5728\u7ec8\u7aef\u4e2d\u663e\u793a\u56fe\u7247\u3002<\/li>\n<\/ul>\n<p><strong>\u4ece AUR \u4ed3\u5e93\u5b89\u88c5\uff1a<\/strong><\/p>\n<p>\u5b57\u4f53\u9884\u89c8\u5de5\u5177 <code>fontpreview-ueberzug<\/code> \u9700\u8981\u4ece AUR \u5b89\u88c5\u3002<\/p>\n<pre><code class=\"lang-bash language-bash bash\">yay -S fontpreview-ueberzug<\/code><\/pre>\n<h3>2.2 \u6838\u5fc3\u914d\u7f6e (\u624b\u52a8\u521b\u5efa)<\/h3>\n<p>\u7531\u4e8e\u6211\u4eec\u9762\u5bf9\u7684 Yazi \u7248\u672c\u53ef\u80fd\u6ca1\u6709 <code>yazi init<\/code> \u547d\u4ee4\uff0c\u6211\u4eec\u9700\u8981\u624b\u52a8\u521b\u5efa\u914d\u7f6e\u6587\u4ef6\u6765\u542f\u7528\u548c\u4f18\u5316\u9884\u89c8\u529f\u80fd\u3002<\/p>\n<h4>2.2.1 \u521b\u5efa\u914d\u7f6e\u76ee\u5f55<\/h4>\n<pre><code class=\"lang-bash language-bash bash\">mkdir -p ~\/.config\/yazi\/<\/code><\/pre>\n<h4>2.2.2 \u521b\u5efa\u5e76\u7f16\u8f91\u4e3b\u914d\u7f6e\u6587\u4ef6<\/h4>\n<p>\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 <code>yazi.toml<\/code> \u6587\u4ef6\u3002<\/p>\n<pre><code class=\"lang-bash language-bash bash\">nano ~\/.config\/yazi\/yazi.toml<\/code><\/pre>\n<h4>2.2.3 \u5199\u5165\u6838\u5fc3\u914d\u7f6e<\/h4>\n<p>\u5c06\u4ee5\u4e0b\u5185\u5bb9<strong>\u5b8c\u6574\u590d\u5236<\/strong>\u5e76\u7c98\u8d34\u5230\u4f60\u6253\u5f00\u7684 <code>yazi.toml<\/code> \u6587\u4ef6\u4e2d\u3002<\/p>\n<pre><code class=\"lang-toml language-toml toml\"># --- \u63d2\u4ef6\u914d\u7f6e ---\n# \u544a\u8bc9 Yazi \u4f7f\u7528 ueberzugpp \u4f5c\u4e3a\u56fe\u7247\u9884\u89c8\u5de5\u5177\n[plugin]\nimage_previewer = &quot;ueberzugpp&quot;\n\n# --- \u9884\u89c8\u8d28\u91cf\u914d\u7f6e ---\n[preview]\n# \u63d0\u9ad8 PDF \u9884\u89c8\u7684\u6e05\u6670\u5ea6 (DPI)\uff0c\u9ed8\u8ba4\u662f 150\npdf_poppler_dpi = 300\n\n# \u63d0\u9ad8\u56fe\u7247\u9884\u89c8\u7684\u8d28\u91cf\n# \u6ce8\u610f\uff1a\u6b64\u65e7\u7248\u672c\u7684\u8303\u56f4\u662f 50-90\uff0c\u800c\u4e0d\u662f\u65b0\u7248\u7684 1-10\nimage_quality = 85<\/code><\/pre>\n<p>\u5b8c\u6210\u540e\uff0c\u4fdd\u5b58\u5e76\u9000\u51fa\u7f16\u8f91\u5668 (<code>Ctrl + O<\/code>, <code>Enter<\/code>, <code>Ctrl + X<\/code>)\u3002<\/p>\n<h3>2.3 \u5f3a\u70c8\u63a8\u8350\uff1a\u66f4\u65b0\u7cfb\u7edf<\/h3>\n<p>\u6211\u4eec\u9047\u5230\u7684\u6240\u6709\u914d\u7f6e\u95ee\u9898\uff08\u6ca1\u6709 <code>init<\/code> \u547d\u4ee4\u3001\u914d\u7f6e\u9879\u8303\u56f4\u4e0d\u540c\uff09\u90fd\u6e90\u4e8e\u8f6f\u4ef6\u7248\u672c\u8fc7\u65e7\u3002\u5728 Arch Linux \u8fd9\u6837\u7684\u6eda\u52a8\u53d1\u884c\u7248\u4e0a\uff0c\u4fdd\u6301\u7cfb\u7edf\u66f4\u65b0\u662f\u6700\u4f73\u5b9e\u8df5\u3002<\/p>\n<p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u53ef\u4ee5\u66f4\u65b0\u4f60\u7cfb\u7edf\u4e0a\u6240\u6709\u7684\u8f6f\u4ef6\u5305\uff0c\u5305\u62ec Yazi\uff1a<\/p>\n<pre><code class=\"lang-bash language-bash bash\">sudo pacman -Syu<\/code><\/pre>\n<p>\u66f4\u65b0\u540e\uff0c\u4f60\u53ef\u80fd\u4f1a\u83b7\u5f97\u4e00\u4e2a\u62e5\u6709 <code>yazi init<\/code> \u547d\u4ee4\u7684\u65b0\u7248\u672c Yazi\uff0c\u672a\u6765\u7684\u914d\u7f6e\u4f1a\u66f4\u52a0\u65b9\u4fbf\u3002<\/p>\n<h3>2.4 (\u53ef\u9009) Shell \u96c6\u6210<\/h3>\n<p>\u4e3a\u4e86\u5728\u9000\u51fa Yazi \u540e\uff0c\u7ec8\u7aef\u80fd\u81ea\u52a8\u8df3\u8f6c\u5230\u6700\u540e\u6d4f\u89c8\u7684\u76ee\u5f55\uff0c\u53ef\u4ee5\u5c06\u4ee5\u4e0b\u51fd\u6570\u6dfb\u52a0\u5230\u4f60\u7684 Shell \u914d\u7f6e\u6587\u4ef6\u4e2d (\u5982 <code>~\/.bashrc<\/code> \u6216 <code>~\/.zshrc<\/code>)\u3002<\/p>\n<pre><code class=\"lang-bash language-bash bash\"># Yazi: cd on quit\nfunction y {\n    local tmp=&quot;$(mktemp -t &quot;yazi-cwd.XXXXX&quot;)&quot;\n    yazi --cwd-file=&quot;$tmp&quot;\n    if [ -f &quot;$tmp&quot; ]; then\n        cd &quot;$(cat &quot;$tmp&quot;)&quot;\n        rm -f &quot;$tmp&quot;\n    fi\n}<\/code><\/pre>\n<p>\u6dfb\u52a0\u540e\uff0c\u4f7f\u7528 <code>source ~\/.bashrc<\/code> (\u6216 <code>~\/.zshrc<\/code>)\u4f7f\u5176\u751f\u6548\uff0c\u4e4b\u540e\u4fbf\u53ef\u4ee5\u7528 <code>y<\/code> \u547d\u4ee4\u6765\u542f\u52a8 Yazi\u3002<\/p>\n<hr \/>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4f60\u5df2\u7ecf\u6210\u529f\u5730\u4e3a\u4f60\u7684 Arch Linux \u7ec8\u7aef\u914d\u7f6e\u4e86 Starship \u63d0\u793a\u7b26\u548c Yazi \u6587\u4ef6\u7ba1\u7406\u5668\u3002\u8fd9\u4e24\u4e2a\u5de5\u5177\u7684\u7ed3\u5408\uff0c\u4e0d\u4ec5\u80fd\u8ba9\u4f60\u7684\u7ec8\u7aef\u754c\u9762\u66f4\u52a0\u73b0\u4ee3\u5316\u548c\u7f8e\u89c2\uff0c\u4e5f\u80fd\u6781\u5927\u5730\u63d0\u5347\u4f60\u5728\u547d\u4ee4\u884c\u4e0b\u7684\u5de5\u4f5c\u6548\u7387\u3002\u5efa\u8bae\u67e5\u9605\u5b83\u4eec\u7684\u5b98\u65b9\u6587\u6863\uff0c\u63a2\u7d22\u66f4\u591a\u9ad8\u7ea7\u5b9a\u5236\u9009\u9879\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u672c\u6307\u5357\u5c06\u6574\u5408\u4e24\u4e2a\u5f3a\u5927\u7684\u7ec8\u7aef\u5de5\u5177\u2014\u2014Starship \u548c Yazi\u2014\u2014\u7684\u5b89\u88c5\u4e0e\u914d\u7f6e\u6d41\u7a0b\uff0c\u5e2e\u52a9\u4f60\u5c06 Arch Linux \u7684\u7ec8\u7aef &#8230;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[6],"tags":[],"class_list":["post-131","post","type-post","status-publish","format-standard","hentry","category-endeavoros"],"_links":{"self":[{"href":"https:\/\/caoxunyi.cn\/index.php\/wp-json\/wp\/v2\/posts\/131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/caoxunyi.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/caoxunyi.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/caoxunyi.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/caoxunyi.cn\/index.php\/wp-json\/wp\/v2\/comments?post=131"}],"version-history":[{"count":4,"href":"https:\/\/caoxunyi.cn\/index.php\/wp-json\/wp\/v2\/posts\/131\/revisions"}],"predecessor-version":[{"id":138,"href":"https:\/\/caoxunyi.cn\/index.php\/wp-json\/wp\/v2\/posts\/131\/revisions\/138"}],"wp:attachment":[{"href":"https:\/\/caoxunyi.cn\/index.php\/wp-json\/wp\/v2\/media?parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/caoxunyi.cn\/index.php\/wp-json\/wp\/v2\/categories?post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/caoxunyi.cn\/index.php\/wp-json\/wp\/v2\/tags?post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}