🌖 整理你的 Shell 命令歷史紀錄
➤ 告別雜亂無章的 Shell 歷史,打造高效的終端機體驗
✤ https://esham.io/2025/05/shell-history
本文探討了 Shell 命令歷史紀錄的管理方式。作者在閱讀了 Simon Tatham 的文章後,思考如何有效地利用 Shell 歷史紀錄,既能保留有用的命令,又能避免無效或錯誤的命令幹擾。作者分享了自己使用 Zsh 管理 9800 條命令歷史紀錄的經驗,並提出了一個名為 `smite` 的 Zsh 函數,可以方便地刪除歷史紀錄中的錯誤或無用的命令。這個函數利用 `fzf` 工具,讓使用者可以輕鬆地瀏覽和刪除歷史指令,保持 Shell 歷史紀錄的整潔和高效。
+ 哇,這個 `smite` 函數看起來超實用!我一直覺得我的 Shell 歷史紀錄很亂,找指令總是找不到,這個函數可以幫我解決這個問題。
+ 我也覺得作者說得很有道理,保留所有指令真的很多都是垃圾,清理一下才能更有效率地使用歷史紀錄,謝謝分享!
#終端機 #Shell #Zsh #效率
If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.social/users/GripNews/statuses/114639267596399073 on your instance and quote it. (Note that quoting is not supported in Mastodon.)