urlhandler: Don't show GUI if only one choice.
This commit is contained in:
parent
d37d054fe8
commit
462a63d31b
|
@ -29,7 +29,8 @@ for url in ${@}; do
|
||||||
for regex cmd in ${(kv)assignments}; do
|
for regex cmd in ${(kv)assignments}; do
|
||||||
if [[ "${url}" -regex-match "${regex}" ]]; then
|
if [[ "${url}" -regex-match "${regex}" ]]; then
|
||||||
|
|
||||||
if [ "$(basename ${0})" = "urlhandler-gui" ]; then
|
if [ "$(basename ${0})" = "urlhandler-gui" ] &&
|
||||||
|
[[ $(tr -d -c ';' <<<${cmd} | wc -c) -gt 1 ]]; then
|
||||||
# Show a dialogue with commands to choose from
|
# Show a dialogue with commands to choose from
|
||||||
choice=$(zenity --list --column="commands" --hide-header ${(s:;:)cmd})
|
choice=$(zenity --list --column="commands" --hide-header ${(s:;:)cmd})
|
||||||
if [ -n "${choice}" ]; then
|
if [ -n "${choice}" ]; then
|
||||||
|
|
Loading…
Reference in New Issue