shell腳本格式化


shell腳本格式化

1. Intellij-idea插件格式化

(1.) 打開file> settings > plugins, 搜索BashSupport, 安裝重啟Idea

(2.) 按ctrl + alt + L鍵進行格式化

2. vscode插件格式化

(1.)插件搜索 格式化:shell-format

(2.)下載 https://github.com/mvdan/sh/releases

(3.)vscode配置

​ 文件->首選項->設置

"shellformat.path": "E:/xxx/shfmt_v2.6.3_windows_amd64.exe"

(4.) 右鍵->format document 進行格式化

(5.) 其他插件

​ 語法提示:shellman 語法檢查:shellcheck

3. 在線格式化

https://tool.lu/shell/
http://web.chacuo.net/formatsh

參考鏈接

https://blog.csdn.net/weixin_42626643/article/details/93178029

https://www.cnblogs.com/testopsfeng/p/13190839.html#:~:text=shellcheck可通過(鼠標右鍵 -> 格式化文檔),或者通過快捷鍵:Ctrl,%2B Alt %2B L格式化代碼


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM