Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
features
lib
.rvmrc
Gemfile
Gemfile.lock
README.md
Rakefile
increment_persistent.gemspec

README.md

About

Increments numbers and stores them in $HOME/.increment

Usage

Simple incrementing

$ increment
#=> 1
$ increment
#=> 2
$ exit
#=> log out, log off, power off or such.
$ increment
#=> 4

Named incrementing

$ increment -n invoice
# => 1
$ increment --name invoice
# => 2

(pre)set, write, a number

$ increment --write 1337
# => 1337
$ increment
# => 1338
$ increment -w 1337
# 1337
$ increment -w 42 -n invoice
# => 42

Or read out (dry-run) without incrementing

$ increment --dry-run
# => 1338

List all named numbers

$ increment --list
  (unnamed) : 1338
  invoice   : 42

Author

Bèr berkes Kessels

Requirements

A POSIX complient system (AKA: will probably not work properly on windows)

TODOs

Make more racecondition-safe with locking.

Something went wrong with that request. Please try again.