diff options
author | Toby Vincent <tobyv13@gmail.com> | 2021-04-11 14:22:18 -0500 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2021-04-11 14:22:18 -0500 |
commit | af6fe7c33d8af1bf728a0fb3867e8765138c4258 (patch) | |
tree | 8e55fb23f7f6ad77ba3141f8543506a9c66dd228 /zsh | |
parent | ef5378a1c29e723667c8d9962892b81673b7d2e6 (diff) |
feat: added github clone alias
Diffstat (limited to 'zsh')
-rw-r--r-- | zsh/aliases.zsh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 16ab231..a673b34 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -7,4 +7,14 @@ alias untar="tar -zxvf " alias py=python3 alias python=python3 alias pip=pip3 -alias dsh="dce sh"
\ No newline at end of file +alias dsh="dce sh" +alias clone=github-clone + + +function github-clone() { + if [[ "$1" != *"/"* ]]; then + 1="$(git config user.username)/$1" + fi + + git clone git@github.com:$1.git +}
\ No newline at end of file |