2 Commits
1.0 ... 1.1

Author SHA1 Message Date
fbt
02c7e5cb1a no more grep! 2014-10-16 13:46:57 +04:00
fbt
b32491ea9c Fixing a typo in the readme 2014-09-28 01:49:58 +04:00
2 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
sx-open
=======
sx-open is an attemt to implement a saner alternative to xdg-open.
sx-open is an attempt to implement a saner alternative to xdg-open.
Installation
------------

View File

@@ -11,7 +11,7 @@ handle_uri() {
local target="$1"
for h in "${!uri_handlers[@]}"; do
grep -oE "${uri_handlers[${h}]}" &>/dev/null <<< "$target" && {
[[ "$target" =~ ${uri_handlers[${h}]} ]] && {
${h} "$target" &
return 0
}
@@ -26,7 +26,7 @@ handle_fs_target() {
target_mimetype=$(file -ib "$target")
for m in "${!mime_handlers[@]}"; do
grep -oE "${mime_handlers[${m}]}" &>/dev/null <<< "$target_mimetype" && {
[[ "$target_mimetype" =~ ${mime_handlers[${m}]} ]] && {
${m} "$target" &
return 0
}