On Wed, Aug 30, 2023 at 05:48:13PM +0200, Страхиња Радић wrote:
> On 23/08/30 09:43AM, Randy Palamar wrote:
> > Personally I see little need for such a patch. I don't really
> > think anyone is pressing <CTRL>+<RETURN> by mistake; they
> > are nowhere near each other on most (all?) keyboard layouts.

A dmenu script in the dmenu repository should set the example for how to
properly use dmenu. If dmenu_run has this (albiet small) bug, then it
could make users assume dmenu always outputs a single line.

> > Actually I didn't even know about this feature despite using
> > dmenu in a number of different scripts for many years. I'm
> > already thinking of some use cases.

If users saw that dmenu_run was handling multi line output from dmenu,
it could alert them to this feature.

> I would actually turn this patch the other way around--and have multiple 
> selection execute all the selected commands.

This would be my implementation for executing all selected commands:

#!/bin/sh
for x in $(dmenu_path | dmenu "$@"); do
  echo "$x" | ${SHELL:-"/bin/sh"} &
done

I suppose this behaviour is more intuitive, but it is a little more
complicated. What are peoples preferences between original patch and
executing all commands?

--
Christopher

Reply via email to