On Sun, Apr 28, 2013 at 01:29:28PM +0000, Thorsten Glaser wrote:
> Peter Hofmann dixit:
> 
> >I believe you can work around all these issues by simply prefixing the
> >command piped to the shell with an "exec":
> >
> >     dmenu_path | dmenu "$@" | sed 's/^/exec /' | ${SHELL:-"/bin/sh"} &
> 
> Won't necessarily work if the result is not a simple command, though…
> 
> FWIW:
> 
> tg@blau:~ $ cat >x1
> #!/bin/sh
> printf 'echo "Hello\tWorld!" | hexdump -C\n'
> tg@blau:~ $ cat >x2
> #!/bin/sh
> eval exec "$(./x1)"
> tg@blau:~ $ chmod +x x?
> tg@blau:~ $ ./x2
> 00000000  48 65 6c 6c 6f 09 57 6f  72 6c 64 21 0a           |Hello.World!.|
> 0000000d
> 
> So the tab is kept when you put Ross’ suggestion into double quotes.
> 

Would the following work in all the cases that we care about?
eval exec "$(dmenu_path | dmenu "$@")"

-- 
Ross Lagerwall

Reply via email to