add python version by hatch in pwsh
This commit is contained in:
parent
50ef7e1b41
commit
a6ae67ade6
@ -8,6 +8,8 @@
|
|||||||
<# =================
|
<# =================
|
||||||
- user variable
|
- user variable
|
||||||
#>
|
#>
|
||||||
|
. "$HOME/OneDrive/sukazyo-pin/environment.ps1"
|
||||||
|
|
||||||
$ws = "S:\workspace"
|
$ws = "S:\workspace"
|
||||||
$tests = "S:\__test"
|
$tests = "S:\__test"
|
||||||
|
|
||||||
@ -26,6 +28,10 @@ function whereis {
|
|||||||
Get-Command $args | Format-List
|
Get-Command $args | Format-List
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function dos2unix { & "C:/Program Files/Git/usr/bin/dos2unix" $args }
|
||||||
|
|
||||||
|
function unix2dos { & "C:/Program Files/Git/usr/bin/unix2dos" $args }
|
||||||
|
|
||||||
<# == batcat == #>
|
<# == batcat == #>
|
||||||
Set-Alias -Name cat -Value bat
|
Set-Alias -Name cat -Value bat
|
||||||
|
|
||||||
@ -200,6 +206,22 @@ Set-Alias -Name cdi -Value zi
|
|||||||
# Import-Module "$ChocolateyProfile"
|
# Import-Module "$ChocolateyProfile"
|
||||||
# }
|
# }
|
||||||
|
|
||||||
|
<# === Python Versions managered by hatch === #>
|
||||||
|
|
||||||
|
$pythons = "$HOME/AppData/Local/hatch/pythons"
|
||||||
|
|
||||||
|
function pys () {
|
||||||
|
$version, $args_pass = $args
|
||||||
|
$py_path = "$pythons/$version/python"
|
||||||
|
echo "using Python version : $version"
|
||||||
|
echo "using Python path : $py_path"
|
||||||
|
& "$py_path/python.exe" $args_pass
|
||||||
|
}
|
||||||
|
|
||||||
|
function pysm () {
|
||||||
|
hatch python $args
|
||||||
|
}
|
||||||
|
|
||||||
<# === Oh-My-Posh === #>
|
<# === Oh-My-Posh === #>
|
||||||
|
|
||||||
# $USE_POSH_THEME = "catppuccin"
|
# $USE_POSH_THEME = "catppuccin"
|
||||||
|
Loading…
Reference in New Issue
Block a user