-
-
Save klmr/8f0bced3a2735750415b1c59aa47bc2a to your computer and use it in GitHub Desktop.
Update bash to latest tmux environment on reattaching.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tmup() { | |
local IFS=$'\n' | |
for line in $(tmux showenv -t $(tmux display -p '#S')); do | |
case $line in | |
-*) unset ${line:1} ;; | |
*) export $line ;; | |
esac | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment