#!/usr/bin/env bash # This fixes the tmux_resurrect thing by replacing all instances of /home/olduser with the current expansion of $HOME. sed -i "s|/home/[[:alnum:]_]*|$HOME|g" ~/.tmux/resurrect/* # This links ~/.tmux/resurrect/last to the appropriate resurrect savefile. files=(~/.tmux/resurrect/*); latest=${files[-1]} ln -s ~/.tmux/resurrect/"$latest" ~/.tmux/resurrect/last