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格式化代码

相关文章:

  • 2021-10-18
  • 2021-08-10
  • 2021-06-02
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-25
  • 2022-03-07
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2021-05-29
相关资源
相似解决方案