mirror of
https://github.com/dylanaraps/shfm.git
synced 2026-11-20 19:41:43 +00:00
drop [
This commit is contained in:
1 file changed
+2
-1
@@ -28,11 +28,12 @@ file_escape() {
|
|||||||
tmp=$1 safe=
|
tmp=$1 safe=
|
||||||
|
|
||||||
# loop over string char by char
|
# loop over string char by char
|
||||||
while [ "$tmp" ]; do
|
while :; do
|
||||||
c=${tmp%"${tmp#?}"*}
|
c=${tmp%"${tmp#?}"*}
|
||||||
|
|
||||||
case $c in
|
case $c in
|
||||||
[[:print:]]) safe=$safe$c ;;
|
[[:print:]]) safe=$safe$c ;;
|
||||||
|
'') return ;;
|
||||||
*) safe=$safe\? ;;
|
*) safe=$safe\? ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user