From 3e875ef7b31c6df9903b13f4b2548ebea0f23c5b Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Tue, 20 Aug 2024 11:13:11 +0500 Subject: zsh: Git clone and cd with single command --- files/.zsh/rc/S50_functions | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'files/.zsh/rc/S50_functions') diff --git a/files/.zsh/rc/S50_functions b/files/.zsh/rc/S50_functions index fe0f3b7..86cb63c 100644 --- a/files/.zsh/rc/S50_functions +++ b/files/.zsh/rc/S50_functions @@ -3,6 +3,10 @@ mcd() { } compdef _directories mcd +gclone() { + git clone --recursive "$1" && cd "$(basename "$1" | sed -e 's/\.git//')" +} + wcc() { wc -c "$@" | numfmt --to=si } -- cgit v1.2.3