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