ref(fish): set is local by default

This commit is contained in:
Léana 江 2023-05-06 17:19:00 +02:00 committed by Léana 江
parent 35e733418f
commit c33a8aaea8
7 changed files with 15 additions and 15 deletions

View file

@ -1,8 +1,8 @@
function clone_repo
if count $argv > /dev/null
set -f name_repo (echo $argv | sd -p '.*[:/]([\w\d._-]+)/([\w\d._-]+).git$' '$1 $2')
set -f name (echo $name_repo | cut -d ' ' -f1)
set -f repo (echo $name_repo | cut -d ' ' -f2)
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/"$name"
git clone $argv ~/repos/"$name"/"$repo"
cd ~/repos/"$name"/"$repo"