# Clone the repo
git clone git@gist.github.com:dc05168913b89f8d065e87a3e976a004.git
# Navigate to repo
cd dc05168913b89f8d065e87a3e976a004
# Give execution permissions
chmod +x gcl
# Link it somewhere in your PATH
ln -svf $PWD/gcl /usr/bin/gcl
# Use it anywhere
gcl git@github.com:metaory/markup.json.git +ugcl <SSH_URL> [OPTION]gcl git@github.com:metaory/markup.json.git
# Clones to: markup.jsongcl git@github.com:metaory/markup.json.git -u
# Clones to: metorial__markup.jsongcl git@github.com:metaory/markup.json.git +u
# Clones to: markup.json__metorialgcl git@github.com:metaory/markup.json.git +foobar
# Clones to: markup.json__foobargcl git@github.com:metaory/markup.json.git -foobar
# Clones to: foobar__markup.jsongcl git@github.com:metaory/markup.json.git +l
# Clones to: markup.json__javascriptgcl git@github.com:metaory/markup.json.git -l
# Clones to: javascript__markup.jsongcl git@github.com:metaory/markup.json.git x11 xorg
# Clones to: markup.json__x11-xorg-uor-U: Prefix with username+uor+U: Suffix with username-lor-L: Prefix with language+lor+L: Suffix with language+<name>: Suffix with custom word-<name>: Prefix with custom wordx12 xog: Suffix with hyphen joined sentence
- Extracts username and repo name from SSH URLs
- Uses double underscore (
__) as separator - Clones with
--depth 1for shallow clones - Includes
--recurse-submodulesfor submodule support - Robust error handling with bash strict mode
- Colored output for debugging
chmod +x gcl
# Add to PATH or use directlyMIT