urlhandler: Allow commands with options
This commit is contained in:
parent
a000b85b90
commit
35ebd713e5
|
@ -35,7 +35,7 @@ local selected_cmd=${default_cmd}
|
|||
for regex cmds in ${(kv)assignments}; do
|
||||
if [[ ${urls[1]} -pcre-match ${regex} ]]; then
|
||||
for cmd in ${(s/;/)cmds}; do
|
||||
if type ${cmd} >& -; then
|
||||
if type ${cmd%% *} >& -; then
|
||||
selected_cmd=${cmd}
|
||||
break
|
||||
fi
|
||||
|
@ -44,4 +44,4 @@ for regex cmds in ${(kv)assignments}; do
|
|||
fi
|
||||
done
|
||||
|
||||
${selected_cmd} ${urls}
|
||||
eval ${selected_cmd} ${urls}
|
||||
|
|
Loading…
Reference in New Issue
Block a user