This commit is contained in:
abs3nt 2024-10-07 18:48:43 -07:00
parent 3fd45047d4
commit cbd1e505dc
Signed by: abs3nt
GPG Key ID: A7BD96A8BAB04C09

View File

@ -1,31 +1,15 @@
repo() {
case "$1" in
'get' )
repo_get "$2"
;;
'open' )
repo_open
;;
'aur' )
repo_aur "$2"
;;
'list' )
list_repos
;;
'go' | 'goto')
repo_goto "$2"
;;
'new' | 'create')
repo_new "$2"
;;
'help' | "-h" | "-help" | "--help")
repo_help
;;
* )
echo "Unknown command: $1"
repo_help
return 1
;;
local cmd="$1"
local arg="$2"
case "$cmd" in
'get' ) repo_clone "git" "$arg" ;;
'aur' ) repo_clone "aur" "$arg" ;;
'open') repo_open ;;
'list') list_repos ;;
'go' | 'goto') repo_goto "$arg" ;;
'new' | 'create') repo_new "$arg" ;;
'help' | "-h" | "-help" | "--help") repo_help ;;
*) echo "Unknown command: $cmd"; repo_help; return 1 ;;
esac
}