This is a lazy programmer request. I would like to create a shell script to automate the following process:
git clone <remote-repo-url>
cd <cloned-folder>
open <cloned-folder>
So, the idea here is to clone the URL, and then immediately cdinto cloned-folder. The trick here is to identify cloned-folderby url pattern.
Now we can assume that the url structure is in this template .../<cloned-folder>.giti.e. url
I am wondering if we can really use awkor some similar tools. I believe that the part I am stuck finds the right one regex.
USE CASE . This uses the case where you are cloning a URL, you want to be in repofolder as soon as possible. This is a prerequisite if you want to run any command git, for example, git logor mate .that we execute in 99% of cases.
Thanks in advance.
source
share