winure/scripts/cmd.sh

22 lines
350 B
Bash
Raw Normal View History

2024-08-22 09:27:15 -04:00
#!/usr/bin/bash
if [ "$#" -ne 0 ]; then
2024-08-22 09:27:15 -04:00
args=''
for arg in $@; do
if [[ $arg =~ ^-.+$ ]]; then
transform=(${arg//-//})
if [[ $arg =~ ^-.+=.+$ ]]; then
transform=(${transform//=/:})
fi
args="$args $transform"
else
args="$args $arg"
fi
done
/mnt/c/Windows/System32/cmd.exe $args
else
/mnt/c/Windows/System32/cmd.exe
fi