Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: piping question
Mikael Magnusson <mikachu@xxxxxxxxx> writes:
> On 4 October 2014 17:50, Christian Neukirchen <chneukirchen@xxxxxxxxx> wrote:
>> Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:
>>
>>> On Oct 3, 4:42pm, Mikael Magnusson wrote:
>>> }
>>> } echo hi there | { xterm -e 'most <& 7' 7< <(cat) }
>>>
>>> I avoided that because I was concerned that some terminal emulators
>>> would close all the descriptors above 2 when launching the command.
>>
>> Unfortunately, all these hacks don't work with urxvt. If anyone has an
>> idea how to do it, I'd like to see.
>
> It works fine for me, the only difference is that it doesn't
> automatically invoke the shell for you if you pass something that
> isn't an array to pass to execv;
> echo hi there | { urxvt -e sh -c 'most <& 7' 7< <(cat) }
You are right! I'm down to
xless() {
{
exec {stdin}<&0
exec urxvt -e sh -c "less ${(qq)@} <&$stdin"
} &!
}
--
Christian Neukirchen <chneukirchen@xxxxxxxxx> http://chneukirchen.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author