tmux-plugins / tmux-resurrect

Persists tmux environment across system restarts.
MIT License
11.31k stars 423 forks source link

Couldn't save last processes on mac OS: pane_pid is wrong #158

Open nerevar opened 8 years ago

nerevar commented 8 years ago

Hello!

In my tmux.conf on mac os I have command:

set-option -g default-command "i > /dev/null 2>&1; reattach-to-user-namespace -l bash"

which allows me to open programs in mac os and copy-paste using system clipboard.

But tmux-resurrect doesn't work with it: according documentation pane_pid — PID of first process in pane. And in my case, tmux-resurrect command getting process ps -eo "ppid command" | sed "s/^ *//" | grep "^93676", which normally returns full process line — returns bash for me and I have only python2.7, vim, bash, in last file.

I think, there is other way to get currently running processes with its arguments in tmux panes, without using pane_pid...

Kriechi commented 8 years ago

Unrelated, but AFAIK reattach-to-user-namespace is not needed anymore on recent OSX/macOS releases. Not sure about the specifics, but pbcopy and pbpaste work for me with 10.11, iterm2, tmux 2.2

bruno- commented 7 years ago

Hi @nerevar, I think things should work WITH reattach-to-user-namespace.. could it be that the i program is messing this up here?

Additionally, did you try things without reattach-to-user-namespace?