Last active
June 14, 2020 01:51
-
-
Save MarkZhangTW/79ca0d2931180a145053dc241592a7ec to your computer and use it in GitHub Desktop.
My bashrc
This file contains hidden or 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
# 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