3 ms·
nice I have something similar for fish, just if string match -q -r 'tmux\-\d+' "$TMUX" tmux show-env \ | sed -nE 's/^(SSH_[^=]+)=(.\*)/
by commotionfever 4y ago
nice I have something similar for fish, just
if string match -q -r 'tmux\-\d+' "$TMUX"
tmux show-env \
| sed -nE 's/^(SSH_[^=]+)=(.\*)/set -gx \1 "\2"/p' \
| source
end
in my config.fish. sometimes it goes stale but a quick `exec fish` fixes it, I didn't want more stuff to run on every prompt
also both of our solutions are nice I think, no need to edit a tmux or ssh config