mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 22:59:15 +00:00
ref(nix): ✨ mkOptions ✨
This commit is contained in:
parent
d98d30916b
commit
989d025f56
42 changed files with 80 additions and 78 deletions
9
nix/home/_/fish/functions/clone_to_repos.fish
Normal file
9
nix/home/_/fish/functions/clone_to_repos.fish
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
if count $argv > /dev/null
|
||||
set name_repo (echo $argv | sed -E 's/.*[:\/]([[:alnum:]._-]+)\/([[:alnum:]._-]+).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
|
||||
Loading…
Add table
Add a link
Reference in a new issue