Idea的Terminal实现`ll`等命令

  1. 管理员的方式启动 PowerShell 输入
 # 更改计算机的 执行策略
set-ExecutionPolicy RemoteSigned 

# 接下来 输入: Y

# 查资料之后发现是在计算机上启动 Windows PowerShell 时,执行策略是 Restricted(默认设置)。
# Restricted 执行策略不允许任何脚本运行。  
# AllSigned 和 RemoteSigned 执行策略可防止 Windows PowerShell 运行没有数字签名的脚本。

# 想了解 计算机上的现用执行策略,打开PowerShell 然后输入 
get-executionpolicy

  1. 在 当前窗口中再次输入 $Profile,得到如下结果
PS G:\pico> $Profile 
C:\Users\leo\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

  1. 找到这个文件并且编辑(没有的话自己创建一个)
  2. 写入以下内容到文件,保存并退出
Set-Alias ll ls
  1. 再次打开 PowerShell,输入 ll 已经成为可以运行的命令

  2. 打开 IDEA -> file -> settings -> Tools -> Terminal

  3. 在 开始菜单 找到 PowerShell 右键 打开文件所在位置,此时可能是一个快捷方式,再次打开文件位置即可。

PowerShell选择

注意:如果想知道系统都有哪些alias,PowerShell 中输入 get-alias 。

# linux  idea 

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×