Maybe someone like it.
#----------------------------------------
#
fn jump-or-exec {
switch(`{read_tags | grep $1}) {
case $1
wmiir xwrite /ctl view $1
case *
if (test -n $2) {
run_command $2 &
}; if not {
run_command $* &
}
}
}
You can call it like is
fn Key-$MODKEY-w { jump-or-exec web iceweasel }
--
