diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-12-03 16:08:43 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-12-03 16:08:43 +0800 |
| commit | 22df30fda5300ec5bb3e1783fe432a696de98d20 (patch) | |
| tree | edac28b04bf117b3462136c78bcbaa9dd84df0ae /scripts/jv_cli.ps1 | |
| parent | a7b7c8da2989fb2ec6622eabb68c384cd8f4a2c0 (diff) | |
Replace shell glob expansion with built-in glob in entry scripts
- Use `noglob` for Zsh and `set -f` for Bash to disable shell globbing -
Wrap PowerShell aliases in functions to prevent glob expansion -
Maintain existing alias functionality while fixing globbing issues
Diffstat (limited to 'scripts/jv_cli.ps1')
| -rw-r--r-- | scripts/jv_cli.ps1 | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/scripts/jv_cli.ps1 b/scripts/jv_cli.ps1 index b77997c..0325578 100644 --- a/scripts/jv_cli.ps1 +++ b/scripts/jv_cli.ps1 @@ -17,10 +17,20 @@ $env:JV_AUTO_UPDATE = "yes" ### ALIASES ### ############### -Set-Alias jvh jv here -Set-Alias jvu jv update -Set-Alias jvt jv track -Set-Alias jmv jv move +function jv { + param([string[]]$Arguments) + & (Get-Command jv -CommandType Application) @Arguments +} + +function jvh { jv here @args } +function jvu { jv update @args } +function jvt { jv track @args } +function jmv { jv move @args } + +Set-Alias jvh jvh +Set-Alias jvu jvu +Set-Alias jvt jvt +Set-Alias jmv jmv ################## ### COMPLETION ### |
