# Clone and edit function cled() { local dir_name clone_dir clone_dir=~/github dir_name=$(echo "$1" | cut -d '/' -f5) echo "$dir_name" test -d $clone_dir && cd $clone_dir || mkdir $clone_dir; cd $clone_dir git clone --depth=1 $1 cd $dir_name && code ./ }
I use this function to quickly (shallow) clone a github repo and open it with my favorite editor.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I use this function to quickly (shallow) clone a github repo and open it with my favorite editor.