Re: [hackers] [dmenu][PATCH] Allow only one dmenu_run selection

2023-08-30 Thread Hiltjo Posthuma
On Wed, Aug 30, 2023 at 11:25:18AM -0700, Jeremy wrote: > On 08/30/23 05:41PM, Christopher Lang wrote: > > 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

Re: [hackers] [dmenu][PATCH] Allow only one dmenu_run selection

2023-08-30 Thread Hiltjo Posthuma
On Wed, Aug 30, 2023 at 05:41:28PM +0100, Christopher Lang wrote: > 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 + by mistake; they >

Re: [hackers] [dmenu][PATCH] Allow only one dmenu_run selection

2023-08-30 Thread Jeremy
On 08/30/23 05:41PM, Christopher Lang wrote: > 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 >

Re: [hackers] [dmenu][PATCH] Allow only one dmenu_run selection

2023-08-30 Thread Christopher Lang
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 + by mistake; they > > are nowhere near each other on most (all?) keyboard layouts. A dmenu

Re: [hackers] [dmenu][PATCH] Allow only one dmenu_run selection

2023-08-30 Thread Страхиња Радић
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 + by mistake; they > are nowhere near each other on most (all?) keyboard layouts. > > Actually I didn't even know about this feature despite using > dmenu in a

Re: [hackers] [dmenu][PATCH] Allow only one dmenu_run selection

2023-08-30 Thread Randy Palamar
On Wed, Aug 30, 2023 at 6:13 AM Christopher Lang wrote: > > Using +, multiple selections can be make in dmenu, each > outputting on a new line. If multiple selections are made in dmenu_run > then multiple lines will be piped to $SHELL which will not be properly > handled. > > This patch only

[hackers] [dmenu][PATCH] Allow only one dmenu_run selection

2023-08-30 Thread Christopher Lang
Using +, multiple selections can be make in dmenu, each outputting on a new line. If multiple selections are made in dmenu_run then multiple lines will be piped to $SHELL which will not be properly handled. This patch only pipes the last line of the output of dmenu to the shell. In effect, the