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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值