From 5f1b53cb9eecc4a3cb9695a646f0a22a1954cdaf Mon Sep 17 00:00:00 2001 From: DenebTM Date: Fri, 15 Nov 2024 19:30:10 +0100 Subject: [PATCH] gitcd (git clone + cd) --- dotconfig/fish/functions/gitcd.fish | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 dotconfig/fish/functions/gitcd.fish diff --git a/dotconfig/fish/functions/gitcd.fish b/dotconfig/fish/functions/gitcd.fish new file mode 100644 index 0000000..b30a274 --- /dev/null +++ b/dotconfig/fish/functions/gitcd.fish @@ -0,0 +1,8 @@ +function gitcd +if set -q argv[2] +set clonedir $argv[2] +else +set clonedir (basename -s '.git' $argv[1]) +end +git clone $argv[1] $clonedir && cd $clonedir +end