Skip to content

Commit 71c50a4

Browse files
committed
Add "wincopy" function to quickly copy files between WSL and Host
1 parent d51316b commit 71c50a4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

wsl-init-script.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ end
116116
function cheat
117117
curl cheat.sh/\$argv
118118
end
119+
120+
function wincopy
121+
set -l winuser '$HOSTNAME'
122+
set -l destination_path /mnt/c/Users/{\$winuser}/Desktop/
123+
mkdir -p \$destination_path
124+
cp -r \$argv \$destination_path
125+
end
119126
EOF
120127

121128
# Fisher plugin manager

0 commit comments

Comments
 (0)