From 6a096a464b89369d6cb3a814e2958cfa619422dc Mon Sep 17 00:00:00 2001 From: Jeremy Cowgar Date: Sat, 13 Jun 2015 13:31:19 -0400 Subject: [PATCH] Added a sample git-flow keybinding --- contrib/git-flow.tigrc | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 contrib/git-flow.tigrc diff --git a/contrib/git-flow.tigrc b/contrib/git-flow.tigrc new file mode 100644 index 0000000..77593d4 --- /dev/null +++ b/contrib/git-flow.tigrc @@ -0,0 +1,51 @@ +# Bindings for git-flow. +# +# Flow bindings start with the capital F and then follow the first character of +# each operation. If executed from the refs view, the operations (that make +# sense to) work on the selected branch. Otherwise, they work on the currently +# checked out branch. +# +# Commands that finish a flow require confirmation to run. Commands that create +# a new flow prompt for user input and run when that input is accepted with no +# confirmation prompt. +# +# Note: Bindings assume the standard git-flow paths of feature, release, hotfix +# and support. +# +# To use these keybindings copy the file to your HOME directory and include it +# from your ~/.tigrc file: +# +# $ cp contrib/git-flow.tigrc ~/.tigrc.git-flow +# $ echo "source ~/.tigrc.git-flow" >> ~/.tigrc + +# Get rid of default bindings for F, as that will be the entry point for all +# git-flow related commands with this binding. +bind main F none +bind generic F none + +# General +bind generic Fi ?git flow init + +# Feature +bind generic Ffs !git flow feature start "%(prompt New feature name: )" +bind generic Fff ?sh -c "git flow feature finish `echo %(repo:head) | sed -e s/feature.//`" +bind refs Fff ?sh -c "git flow feature finish `echo %(branch) | sed -e s/feature.//`" + +# Release +bind generic Frs !git flow release start "%(prompt New release name: )" +bind generic Frf ?sh -c "git flow release finish `echo %(repo:head) | sed -e s/release.//`" +bind refs Frf ?sh -c "git flow release finish `echo %(branch) | sed -e s/release.//`" + +# Hot Fix +bind generic Fhs !git flow hotfix start "%(prompt New hotfix name: )" +bind generic Fhf ?sh -c "git flow hotfix finish `echo %(repo:head) | sed -e s/hotfix.//`" +bind refs Fhf ?sh -c "git flow hotfix finish `echo %(branch) | sed -e s/hotfix.//`" + +# Support +# +# Support is commented out, it is still a "very EXPERIMENTAL!" feature as described +# by git flow commands themselves. Further, the command for git flow support start +# isn't yet correct. +#bind refs Fss !git flow support start "%(prompt New support name: )" %(branch) +#bind generic Fsf ?sh -c "git flow support finish `echo %(repo:head) | sed -e s/support.//`" +#bind refs Fsf ?sh -c "git flow support finish `echo %(branch) | sed -e s/support.//`" -- 2.11.4.GIT