Skip to content

Commit

Permalink
Command line script that fully restores tmux environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Sutic committed Sep 24, 2014
1 parent ec9f68c commit a7fe9dc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- save command strategy: 'pgrep'. It's here only if fallback is needed.
- save command strategy: 'gdb'
- rename default strategy name to 'ps'
- create `expect` script that can fully restore tmux environment

### v1.3.0, 2014-09-20
- remove dependency on `pgrep` command. Use `ps` for fetching process names.
Expand Down
14 changes: 14 additions & 0 deletions scripts/restore.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env expect

# start tmux
spawn tmux -S/tmp/foo

# delay with sleep to compensate for tmux starting time
sleep 2

# run restore script directly
send "~/.tmux/plugins/tmux-resurrect/scripts/restore.sh\r"

# long wait until tmux restore is complete
# (things get messed up if expect client isn't attached)
sleep 100

0 comments on commit a7fe9dc

Please sign in to comment.