fix(script): fix match '~' to avoid expansion

This commit is contained in:
Fodesu
2026-03-17 02:10:44 +08:00
committed by 晨苒
parent 49bc2c868b
commit 30a2d2dfff
+2 -2
View File
@@ -117,8 +117,8 @@ if [ "$SILENT" = false ]; then
read -r input < /dev/tty || true read -r input < /dev/tty || true
if [ -n "$input" ]; then if [ -n "$input" ]; then
case "$input" in case "$input" in
~) WORKSPACE="${HOME:-/tmp}" ;; "~") WORKSPACE="${HOME:-/tmp}" ;;
~/*) WORKSPACE="${HOME:-/tmp}${input#\~}" ;; "~"/*) WORKSPACE="${HOME:-/tmp}${input#\~}" ;;
*) WORKSPACE="$input" ;; *) WORKSPACE="$input" ;;
esac esac
fi fi