I've returned to Linux but I miss PowerShell
10 months ago
- #PowerShell
- #Shell-Scripting
- #Linux
- 作者从Windows切换回Linux后怀念PowerShell的功能
- PowerShell为cmdlet提供免费标签补全,使脚本编写更轻松
- vscode的PowerShell扩展提供内置调试、自动补全和代码检查
- PowerShell拥有内置包管理器(Install-Module),便于模块安装
- PowerShell支持自动缩写命令(如Test-MyCmdlet -A)
- PowerShell的帮助系统是集成的,手册页易于编写和访问
- PowerShell命令遵循一致的命名规范(动词-名词)
- PowerShell使用对象而非纯文本,简化了数据操作
- PowerShell支持类型检查,防止变量类型不匹配
- PowerShell允许标签补全JSON和XML属性,便于数据查询
- 作者不喜欢PowerShell 5.1和7版本的分裂以及Windows的怪癖
- PowerShell缺少像bash的set -e这样的通用'快速失败'模式
- 相比bash/zsh,作者更偏爱PowerShell的直观性和一致性