Powershell 设置别名 Alias

使用 zsh 之后,回到windows,我很怀念alias功能。 以及 zshrc 配置文件。

但是 powershell 可以实现类似的功能:参考


  1. 打开管理员 powershell , 执行允许ps1脚本的命令:
1Set-ExecutionPolicy RemoteSigned
  1. 编辑配置文件(可以用任何自己喜欢的编辑器)
1code $PROFILE
1# 例如:
2# 快速移动到 hugo 工作目录:
3
4function hg { Set-Location -Path 'C:\Users\kasus\hugo-win' }
5
6# 执行多行命令
7
8function xxx { Set-Location -Path 'C:\github\xxx' ; git pull }

Mac Essencials 3
Xray扫描器-如何登录扫描