-
-
Notifications
You must be signed in to change notification settings - Fork 1
Snippets
not edited this page Jan 27, 2023
·
19 revisions
Snippets can be found in the lilvim wiki.
use str
# Clone remote repository and change to created directory
#
# @usage
# clone mvllow/colorish
# clone rose-pine/neovim rose-pine-neovim
fn clone {|repo @rest|
var _ name = (str:split / $repo)
git clone [email protected]:$repo.git $@rest
cd (coalesce $@rest $name)
}
# Clone remote repository and change to created directory
#
# @usage
# clone mvllow/colorish
# clone rose-pine/neovim rose-pine-neovim
clone() {
repo=$1
name=${repo#*/}
git clone [email protected]:$repo.git ${@:2}
if [ -n "$2" ]; then
cd $2
else
cd $name
fi
}