From 2b18bb3c494343de62daadfda9b85811ca413eb8 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sun, 21 May 2023 11:19:35 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'zsh/plugins/projec?= =?UTF-8?q?t.plugin.zsh'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zsh/plugins/project.plugin.zsh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/zsh/plugins/project.plugin.zsh b/zsh/plugins/project.plugin.zsh index deed78e..08bd690 100644 --- a/zsh/plugins/project.plugin.zsh +++ b/zsh/plugins/project.plugin.zsh @@ -5,6 +5,16 @@ _project() { compadd $(find $_PROJECT_DIR -maxdepth 1 -type l | sed 's#^\(.*\)/\([a-zA-Z0-9\._ -]*\)$#\2#g') } +gcll () { + REPO="$1" + DEST="$2" + if [ -z "$DEST" ] + then + DEST="$(basename "$REPO" | sed 's/\.git$//')" + fi + git clone "$REPO" && cd "$DEST" +} + repo() { if [ "$1" = "-n" -a -n "$2" ]; then TO="$3"