Skip to content

Instantly share code, notes, and snippets.

@kylemanna
Forked from simonjbeaumont/tmup
Created July 6, 2013 02:32
Show Gist options
  • Save kylemanna/5938393 to your computer and use it in GitHub Desktop.
Save kylemanna/5938393 to your computer and use it in GitHub Desktop.
#!/bin/bash
tmup ()
{
echo -n "Updating to latest tmux environment...";
export IFS=",";
for line in $(tmux showenv -t $(tmux display -p "#S") | tr "\n" ",");
do
if [[ $line == -* ]]; then
unset $(echo $line | cut -c2-);
else
export $line;
fi;
done;
unset IFS;
echo "Done"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment