Created
April 9, 2010 16:16
-
-
Save gaving/361328 to your computer and use it in GitHub Desktop.
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
if which pbpaste > /dev/null; then | |
# build git clone command from clipboard | |
git-clone-clipboard() { | |
REPO_URL="$(pbpaste)" | |
REPO_BASE_NAME=${$(basename $REPO_URL)%.git} | |
LBUFFER="nocorrect git clone $REPO_URL $REPO_BASE_NAME" | |
} | |
zle -N git-clone-clipboard | |
bindkey "^Xg" git-clone-clipboard | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment