Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Open GitKraken from the terminal
## Forked from
## Also received help from
## Open GitKraken using the current repo directory.
## This code is for fish shell. The same thing can be done in bash
## by creating an alias with the command below.
## `1>/dev/null` directs logs from the terminal
## `&` allows use of the same terminal instance to do other things
## Note: If you're not using OSX, the path is definitely different.
function kraken
set dir $argv[1] (pwd) # use a directory if you pass it in, otherwise cwd
/Applications/ -p $dir 1>/dev/null &
## Now you can simply run `kraken` from your git repo directory.
## Optionally specify the directory of your git repo as the first parameter.
Copy link

marcosfreitas commented May 8, 2017

I'm using Ubuntu 16.10 and I have Git Kraken 2.5.0 installed, so I don't need to create a new function because if I execute gitkraken into terminal the app will run.

Copy link

souhaiebtar commented May 15, 2017

would you please, help me to customize it for zsh
i tried

gitkraken() {
	set dir $1 (pwd)
	/Applications/ -p $dir 1>/dev/null &

but it tell me
gitkraken:1: number expected

Copy link

souhaiebtar commented May 15, 2017

for zsh, i added this to .zshrc

gitkraken() {
	if [ "$1" != "" ]
		/Applications/ -p $1 1>/dev/null &
		/Applications/ -p . 1>/dev/null &

and it worked

the problem with this one is that after closing gitkraken
zsh is using 100% CPU

i don't now where is the problem

Copy link

mrexodia commented Apr 22, 2018

I wrote a version in go go get

Copy link

skywinder commented Dec 30, 2019

What the difference between this gist and ?

Copy link

BBlackwo commented Dec 30, 2019

@skywinder this is a forked version for fish shell. That one is for z shell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment