tmux-plugins/tmux-resurrect

node-dev / restore functionality

Open

#44 opened on Sep 18, 2014

View on GitHub
 (26 comments) (0 reactions) (0 assignees)Shell (12,753 stars) (509 forks)batch import
bughelp wantedopinion wanted

Description

Hey nice useful project here.

I noticed set -g @resurrect-processes '"~node-dev"' doesn't work, but i think set -g @resurrect-processes '"~node"' did restore, but restored only a blank node session, not my original node-dev index.js command.

I think node-dev actually calls node and the process runs as node.

What if tmux-restore detected whether a window had a process running, and you based restoring on the command that caused that program to run?

If I add node to my processes, i get a terminal that runs as if I had merely called node by itself, and it appears not to care what initially spawned the process.

This could be possible, right, by sniffing the history? I see the list of processes as a whitelist, interested by the currently running processes during a save. If they match, then run the same command again. Right?

Contributor guide