dialog is hard to use inside $(...)