A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/peterhurford/git-it-on.zsh below:

peterhurford/git-it-on.zsh: Quickly navigate GitHub from the command line.

A lot of times we have to look at files on GitHub. But this intrudes our ideal command-line workflow, having to switch to a browser and navigate to the URL. Wouldn't it be nice to just be able to open that file from the command line?

Git It On, the plugin for zshell, comes in here.

Note: This plugin is stable, but still in active development. I do not yet consider this plugin finished.

Note: This was built on a Mac. Support for Linux is experimental, and has not been tested by the plugin author.

--

Assuming you have oh-my-zsh, you can simply write

git clone https://github.com/peterhurford/git-it-on.zsh ~/.oh-my-zsh/custom/plugins/git-it-on
echo "plugins+=(git-it-on)" >> ~/.zshrc

(Alternatively, you can place the git-it-on plugin in the plugins=(...) local manually.)

--

Add antigen bundle peterhurford/git-it-on.zsh to your .zshrc wherever you're adding the other antigen bundles.

If you’re using Zgen, add zgen load peterhurford/git-it-on.zsh to your .zshrc wherever you're adding your other zgen plugins.

If you're lame and use bash, you can install this directly to your ~/.bash_profile:

curl -s https://raw.githubusercontent.com/peterhurford/git-it-on.zsh/master/git-it-on.plugin.zsh >> ~/.bash_profile

That's cool... What else?

Gitlab commands also have short alternatives:
glcompare|glcm, glcommits|glco, glhistory|glh, glbranches|glb, glmerges|glm, glissues|gli, glctrlp|glcr, glnetwork|gln

But why even leave vim for the command line?

TODO: Make and link vim companion plugin.

These commands are too long, I want to be even faster!

You can make commands faster by using aliases. Put the following in your .zshrc (or .bash_profile)

#Gitit Aliases
alias myrepos="gitit repo peterhurford" #put your name here (usage: `myrepos <reponame>` to open up your repo.)
alias compare="gitit compare"
alias commits="gitit commits"
alias branch="gitit branch"
alias gistory="gitit history"
alias prs="gitit pulls"
alias myprs="gitit pulls author:peterhurford" #put your name here
alias mybranches="gitit branches mine"
alias gitgrep="gitit grep"
alias ctrlp="gitit ctrlp"

Feel free to change the aliases to whatever you'd like. You can even make them shorter, but the above is what I use. Note that these aliases are not included by default.

If you want more git-related aliases for making your git workflow faster, also look at my Git-aliases.zsh plugin.

Got any more plugins to share?

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4