blob: bdd034ac9149f8716fd425554cd28221e7d4d810 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/bin/sh
tmp="$PWD"
enc=""
while [ -n "$tmp" ]; do
cut="${tmp#?}"
c="${tmp%"$cut"}"
case "$c" in
[-/:_.!\'\(\)~[:alnum:]] ) enc="$enc$c" ;;
* ) enc="$enc$(printf '%%%02X' """\"$c")" ;;
esac
tmp="$cut"
done
printf "\033]7;file://%s%s\007" "$(hostname)" "$enc"
|