diff options
Diffstat (limited to 'src/caribou.py')
-rw-r--r-- | src/caribou.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/caribou.py b/src/caribou.py index 3a38d1e..8d51c83 100644 --- a/src/caribou.py +++ b/src/caribou.py @@ -132,11 +132,12 @@ def usage(): print _("Help Options:") print " -d, --debug " + _("Print debug messages on stdout") print " -h, --help " + _("Show this help message") + print " -v, --version " + _("Display version") if __name__ == "__main__": try: - options, xargs = getopt.getopt(sys.argv[1:], "dh", ["debug", "help"]) + options, xargs = getopt.getopt(sys.argv[1:], "dhv", ["debug", "help", "version"]) except getopt.GetoptError, e: print "Error: " + e.__str__() + "\n" usage() @@ -150,6 +151,10 @@ if __name__ == "__main__": usage() sys.exit(0) + if opt in ("-v", "--version"): + print "caribou @VERSION@" + sys.exit(0) + test = Test() # TODO: make a for loop #EVENTS = ["object:state-changed:focused", "object:text-caret-moved"] |