Created
July 3, 2019 07:47
-
-
Save OwenChia/de984300960bf70bf04a466664bb636d to your computer and use it in GitHub Desktop.
proxychains shotcut
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
# proxychains shotcut | |
proxy-command-line() { | |
[[ -z $BUFFER ]] && zle up-history | |
[[ $BUFFER == sudo\ * ]] && LBUFFER="sudo proxychains ${LBUFFER/sudo /}" | |
[[ $BUFFER != proxychains\ * ]] && [[ $BUFFER != sudo\ proxychains\ * ]] && LBUFFER="proxychains $LBUFFER" | |
} | |
zle -N proxy-command-line | |
# Defined shortcut keys: [Esc] [Esc] [p] | |
bindkey "\e\ep" proxy-command-line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment