Command Line Ticketing System

As I have said before life at the terminal is a joy. I constantly struggle with keeping myself organized. I actually work pretty well keeping most things in my head. But one of these days I’m going to fall down and hit my head and forget everything. So try and try again to keep myself organized and documented do I. I was recently pointed to TicGit its a ticketing system that is meant to integrate right into your repository. Well I’m not a developer but I can see the benefit for a terminal todo list and general ticketing for myself as well as my little script repository that is actually maintained in git. Well ok maybe maintained is a bit strong of a word. Anyway on to the good stuff.
This is how I got ticgit installed and working for mysef.

sudo aptitude install git-core rubygems rake
sudo gem update --system
sudo gem install git
git clone git://github.com/schacon/ticgit.git ticgit.git
cd ticgit.git
rake
sudo gem install pkg/ticgit-0.2.0.gem
cd

Not to bad eh? Well we are not quite done. ticgit needs a git repository so if your going to use this for a simple todo list you need to go ahead and get a git repo setup for it.

mkdir ticgit
cd ticgit
git init
echo 'please use ti command to view the todos' | tee  readme.txt
git add readme.txt
git commit -m 'initial commit'

Now you can use ticgit in this directroy. You should like the ti command to something in your path.

sudo ln -s  /var/lib/gems/1.8/bin/ti /usr/local/bin/ti

Now you can use the ti commands list, show, new, checkout, state,. comment, and tag to update your simple ticketing system.
What? …. Yeah so I remember most thing but remembering those options isn’t one of them. Plus I don’t like to type any more that I have to. So I wrote a bash_completion stub for ti. All you have to do is drop it in your /etc/bash_completion.d/ as ti_completion


# Author: Nick Anderson
# http://www.cmdln.org
# Description: Simple Bash Completion for ticgit

_ti()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="list show new checkout state comment tag"

case "${prev}" in
list)
local list_opts="--order --tag --state --assigned --saveas --list"
COMPREPLY=( $(compgen -W "${list_opts}" -- ${cur}) )
return 0
;;
ti)
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
state)
local state_opts="open resolved invalid hold"
COMPREPLY=( $(compgen -W "${state_opts}" ${cur}) )
return 0
;;
*)
return 0
;;
esac

}
complete -F _ti ti

I also made up a quick screencast of ticgit so you can see it in all of its glory. Watch the TicGit Screencast.

5 Comments

  • […] maintained in git. Well ok maybe maintained is a bit strong of a word. Anyway on to the good stuff. TicGit howto, command line ticketing system As I have said before life at the terminal is a joy. I constantly struggle with keeping myself […]

  • Roland Ubuntu Firefox 2.0.0.13 wrote:

    Nice tip. My one complain is that your ‘recent articles’ slideticker causes quite a strain on my cpu.

    (running Firefox 2.0.0.13 on Ubuntu 7.10)

  • Jim Vanderveen Mac OS X Firefox 2.0.0.16 wrote:

    Seconding Roland’s comment. I always get suspicious when my CPU is pegging.

    FYI, I’m running Firefox 2.0.0.16 on Mac OS X 10.5.4 (PowerBook G4, non-Intel chip).

  • Ok 2 complaints is enough, I removed the slider. Thanks for reading.

  • Hey how goes.
    I’ve become the maintainer for ticgit as Scott Chacon is preoccupied with other more exciting things.

    Awesome bash completion snippet! That’s the first I’ve heard of bash completion for ticgit. Love the screencast too, I’m going to link back to here from the Readme, this is the first screencast for ticgit that I’ve come across, it could be useful to other people.

    Looks like the blog and screencast are from 2008, but their still relevant with today’s ticgit.

    http://github.com/jeffWelling/ticgit

Leave a Reply

Your email is never shared.Required fields are marked *

To submit your comment, click the image below where it asks you to...
Clickcha - The One-Click Captcha