ref(fish): renamed clone_repo to clone_to_repos

This commit is contained in:
Léana 江 2023-05-06 18:41:07 +02:00 committed by Léana 江
parent 48d115fb4e
commit 024fab6ebe
2 changed files with 2 additions and 2 deletions

View file

@ -0,0 +1,11 @@
function clone_to_repos
if count $argv > /dev/null
set name_repo (echo $argv | sd -p '.*[:/]([\w\d._-]+)/([\w\d._-]+).git$' '$1 $2')
set name (echo $name_repo | cut -d ' ' -f1)
set repo (echo $name_repo | cut -d ' ' -f2)
mkdir -p $REPOS_PATH/$name
git clone $argv $REPOS_PATH/$name/$repo
else
echo "Please provide a git url"
end
end