martanne / dvtm

dvtm brings the concept of tiling window management, popularized by X11-window managers like dwm to the console. As a console window manager it tries to make it easy to work with multiple console based programs.
MIT License
848 stars 105 forks source link

question: how to create a new shell window from a shell #65

Open sharethewisdom opened 7 years ago

sharethewisdom commented 7 years ago

I'm aware that this isn't a Q&A site, sorry!

But please consider this zsh function:

xless() {
  { exec {stdin}<&0 {stderr}>&2
    exec urxvt -e sh -c "less ${(j: :)${(qq)@}} </dev/fd/$stdin 2>/dev/fd/$stderr"
  } &!
}

This is useful for collecting stderr or grepping verbose output that would otherwise go off screen. Now, by piping something into xless, I want a new shell window to (remain) open within dvtm instead. (not running X) How would you go about doing that? Any advice would be welcome.