therubymug / hitch

Git author attribution helper for pair programmers.
http://github.com/therubymug/hitch
MIT License
250 stars 32 forks source link

fish shell support #22

Open Globegitter opened 9 years ago

Globegitter commented 9 years ago

It would be great to get https://github.com/fish-shell/fish-shell/ support. Currently getting these errors: screen shot 2015-03-18 at 00 22 02

therubymug commented 9 years ago

Hello @Globegitter. I'll install fish-shell and tinker with it.

stephenprater commented 9 years ago

@therubymug https://github.com/therubymug/hitch/blob/master/lib/hitch/hitch.sh

This file is valid for ZSH or bash, but it isn't going to work with fish.

therubymug commented 9 years ago

@Globegitter: Do you mind trying this out and see if it helps? https://github.com/edc/bass

ezuk commented 7 years ago

Here's my working solution:

$ cat config/fish/functions/pair.fish                                                            
function pair --description "begin pairing"
hitch  $argv[1] $argv[2]
source ~/.hitch_export_authors
end

$ cat config/fish/functions/unpair.fish                                                                
function unpair --description "end pairing"
hitch -u
set -e GIT_AUTHOR_NAME
set -e GIT_AUTHOR_EMAIL
rm ~/.hitch_export_authors
end

and in config.fish:

if test -f ~/.hitch_export_authors; source ~/.hitch_export_authors; end