From b71fe74a3251f12ef358883204717626c03d328c Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 1 Jan 2024 18:25:59 +0100 Subject: [PATCH] ensure path is windows-ok --- .config/fish/functions/trash.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/fish/functions/trash.fish b/.config/fish/functions/trash.fish index 32a414a..e7780c2 100644 --- a/.config/fish/functions/trash.fish +++ b/.config/fish/functions/trash.fish @@ -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 {" \