diff --git a/src/util.sh b/src/util.sh index aa67e327..2fa694a2 100644 --- a/src/util.sh +++ b/src/util.sh @@ -2302,6 +2302,19 @@ function ble-autoload { ble/util/autoload "$file" "${functions[@]}" } +function ble/util/import/encode-filename { + ret=$1 + local chars=%$'\t\n !"$&\'();<>\\^`|' # + if [[ $ret == *["$chars"]* ]]; then + local i n=${#chars} reps a b + reps=(%{25,08,0A,2{0..2},24,2{6..9},3B,3C,3E,5C,5E,60,7C}) + for ((i=0;i