I want to create an alias that looks something like this:
alias getres="git clone https://github.com/user/"
The goal is that i can type "getres repository name" and get the the repository.
However as it stands now,
typing "getres repository name"
Gives me an error saying the repostiory can't be found.
This happens because getres repository name gets translated to:
git clone https://github.com/user/ repository name
which means you have a space character between https://github.com/user/ and repository name which completely mess with your URL.
The solution for your problem is to create a bash script which accepts 1 parameter (the repository name) then use that script in your alias.
see Make a Bash alias that takes a parameter?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With