Skip to content

Instantly share code, notes, and snippets.

@MarkZhangTW
Last active June 14, 2020 01:51
Show Gist options
  • Save MarkZhangTW/79ca0d2931180a145053dc241592a7ec to your computer and use it in GitHub Desktop.
Save MarkZhangTW/79ca0d2931180a145053dc241592a7ec to your computer and use it in GitHub Desktop.
My bashrc
# BUG: cursor will disappear after open tmux
function cursor_green { printf '%b' '\e]12;green\a'; }
# cursor_green
# print escape character when login will cause SCP malfunction
# SSH auto-reconnect
# https://backreference.org/2013/04/26/ssh-auto-reconnect/
function ssh {
while true; do
command ssh "$@";
ssh_return_code=$?;
echo $ssh_return_code;
[ $ssh_returne_code -ne 255 ] && break || sleep 0.5;
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment