OS
Windows
Shortcut

Windows 配置命令快捷键

Windows Terminal

Add the following to the end of your profile file:

# Open the profile file in notepad
notepad $PROFILE

例子:

function ScoopRun {scoop @args}
set-alias -Name s -Value ScoopRun

实际运行的命令是 scoop @args,映射的快捷键是 s

自己常用快捷键配置

function VscodeRun { param([string]$Path = ".") code $Path }
set-alias -Name c -Value VscodeRun
function BRRun {bun run @args}
set-alias -Name br -Value BRrun
function PyRun {python @args}
set-alias -Name py -Value python
function ScoopRun {scoop @args}
set-alias -Name s -Value ScoopRun
function GitRun {git @args}
set-alias -Name g -Value GitRun
function Aria2cDownload {aria2c --summary-interval=10 -x 3 --allow-overwrite=true -Z @args}
set-alias -Name ard -Value Aria2cDownload