[dev] [dmenu] unwanted behaviour when feeded from stdin

From: Damien Thiriet <damien_AT_thiriet.web4me.fr>
Date: Sat, 21 Nov 2020 17:35:30 +0100

Hi list,


I am heavily using dmenu to feed editor with external shell scripts
when writing *TeX files. Since dmenu 4.9, I noticed a new, and
somehow annoying, behaviour: when dmenu is called from STDIN
twice in a row, the scripts hangs, waiting for input from the shelle
and I have to type ^D to get the script running further on.
Looks like it doesn't happen when dmenu is reading a file.

Here is a basic MWE:

#!/bin/ksh
Orientation=$(echo "horizontal\nvertical"|dmenu)
#here the cursor goes back to the shell and I
#have to type Ctr-D to have the script running further on
NbLignes=$(dmenu -p "nombre de lignes")
echo "tableau: $Orientation de $NbLignes lignes"

I experienced this on both st and xterm on OpenBSD.
What can I do to avoid this behaviour?

Thanks,

Damien Thiriet
Received on Sat Nov 21 2020 - 17:35:30 CET

This archive was generated by hypermail 2.3.0 : Sat Nov 21 2020 - 18:48:08 CET