On Thu, 10 Feb 2022 at 14:56, Thomas Lauer wrote: > > > Well... as I wrote in my OP: if I replace the rofi call with a tiny > > > script that does precisely the same thing but *always* exits with error > > > code 0, all works as it should. So I am pretty sure that rofi exiting > > > with 1 is indeed the culprit here. > > > > If you use your tiny script and replace "exit 0" with "exit $?" (so it > > exits with the same status as rofi) does that still reproduce the > > problem? > > Yes, the function still breaks. What happens if you add `emulate -L zsh` (without quotes) at the top of the function? Roman.