From acc88fdf81716c05f07914db0ecace0295a12dda Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 1 May 2021 15:08:04 +0100 Subject: [PATCH] Add labs and git clone alias --- .config/shell/aliasrc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index edc57c4..4c30088 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -44,9 +44,21 @@ alias \ ll="ls -l" \ la="ls -al" \ ag="alias | grep" \ + lc="clone_from_labs" \ + gc="clone_from_github" \ enp="enpasscli -vault="$HOME/Documents/Enpass/Vaults/primary" -sort show" \ dgit="git --git-dir ~/.config/dotfiles/.git --work-tree=$HOME" +# Clone from labs +function clone_from_labs() { + git clone "git@labs.scarif.space:chris/$1" "${@:2}" +} + +# Clone from github +function clone_from_github() { + git clone "https://github.com/$1" "${@:2}" +} + # Check if main exists and use instead of master function git_main_branch() { command git rev-parse --git-dir &>/dev/null || return