|
|
@@ -1,9 +1,9 @@
|
|
|
#!/usr/bin/env bash
|
|
|
-# winpy.sh — stream Windows python.exe output in WSL
|
|
|
+# vls_python — stream Windows python.exe output in WSL
|
|
|
# Usage:
|
|
|
-# winpy.sh script.py [args...]
|
|
|
-# winpy.sh -c "print('hi')"
|
|
|
-# winpy.sh -m module [args...]
|
|
|
+# vls_python script.py [args...]
|
|
|
+# vls_python -c "print('hi')"
|
|
|
+# vls_python -m module [args...]
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
@@ -35,9 +35,10 @@ else
|
|
|
fi
|
|
|
|
|
|
# Optional: convert any remaining args that are existing WSL paths if you set
|
|
|
-# WINPY_CONVERT_ARGS=1 in your environment.
|
|
|
+# VLS_PYTHON_CONVERT_ARGS=1 (WINPY_CONVERT_ARGS is still accepted).
|
|
|
ARGS=()
|
|
|
-if [[ "${WINPY_CONVERT_ARGS:-0}" == "1" ]]; then
|
|
|
+convert_flag="${VLS_PYTHON_CONVERT_ARGS:-${WINPY_CONVERT_ARGS:-0}}"
|
|
|
+if [[ "$convert_flag" == "1" ]]; then
|
|
|
for a in "$@"; do
|
|
|
if [[ -e "$a" ]]; then
|
|
|
ARGS+=("$(wslpath -w "$a")")
|