extend cl to allow repo name instead of just url
This commit is contained in:
parent
9f4dc0aced
commit
0bfd408974
2 changed files with 8 additions and 0 deletions
|
|
@ -94,6 +94,10 @@ cl() {
|
|||
elif [[ $url =~ https://github\.com/([^/]+)/([^/]+)\.git ]]; then
|
||||
local project_name="${match[1]}"
|
||||
local repository_name="${match[2]}"
|
||||
elif [[ $# -ne 0 ]]; then
|
||||
local project_name="juancwu"
|
||||
local repository_name="$url"
|
||||
local url="git@github.com:juancwu/$repository_name.git"
|
||||
else
|
||||
echo "Invalid URL format"
|
||||
return 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue