diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-11-23 14:21:43 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-11-23 14:21:43 +0800 |
| commit | c92c3bfa5d61a49d5d3ff1cda836c23887670249 (patch) | |
| tree | 4a664c27b1f93b3f17f9a702a75825fd89054d8b /scripts/jv_cli.ps1 | |
| parent | aa436345dedec732e59dc32053e1845975120295 (diff) | |
Add PowerShell CLI support script for jv tool
Diffstat (limited to 'scripts/jv_cli.ps1')
| -rw-r--r-- | scripts/jv_cli.ps1 | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/scripts/jv_cli.ps1 b/scripts/jv_cli.ps1 new file mode 100644 index 0000000..0584c21 --- /dev/null +++ b/scripts/jv_cli.ps1 @@ -0,0 +1,37 @@ +$SCRIPT_DIR = Split-Path -Parent $MyInvocation.MyCommand.Definition + +############## +### CONFIG ### +############## + +# Use JV_LANG to set CLI language +# Supported: en, zh-CN +# $env:JV_LANG = "en" + +############### +### ALIASES ### +############### + +Set-Alias jvh jv here +Set-Alias jvu jv update +Set-Alias jvt jv track +Set-Alias jmv jv move + +################## +### COMPLETION ### +################## + +if (Test-Path "$SCRIPT_DIR\completions\powershell\completion_jv.ps1") { + . "$SCRIPT_DIR\completions\powershell\completion_jv.ps1" +} +if (Test-Path "$SCRIPT_DIR\completions\powershell\completion_jvv.ps1") { + . "$SCRIPT_DIR\completions\powershell\completion_jvv.ps1" +} + +################### +### ENVIRONMENT ### +################### + +if (Test-Path "$SCRIPT_DIR\bin") { + $env:PATH = "$SCRIPT_DIR\bin;" + $env:PATH +} |
