ensure path is windows-ok

This commit is contained in:
Mylloon 2024-01-01 18:25:59 +01:00
parent 082b6d2847
commit b71fe74a32
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -9,7 +9,7 @@ function trash --description "Move file or directory to the windows recycle bin.
end
# Move file to trash
set file "$argv[1]"
set file (string replace -a \\ \\\\ (wslpath -w $argv[1]))
powershell.exe -Command "& {" \
" Add-Type -AssemblyName 'Microsoft.VisualBasic';" \
" Get-ChildItem -Path '$file' | ForEach-Object {" \