simon-git: caltrap (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Thu Feb 23 20:09:51 GMT 2017


TL;DR:
  5154fda Add a config file mechanism, and move .caltrapdb.
  8697488 Support a 'pager' config option.
  fd862d3 Support date aliases 'yesterday', 'today' and 'tomorrow'.

Repository:     https://git.tartarus.org/simon/caltrap.git
On the web:     https://git.tartarus.org/?p=simon/caltrap.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2017-02-23 20:09:51

commit 5154fdaa344e6e8e3243d5c9cef7955c512f4074
web diff https://git.tartarus.org/?p=simon/caltrap.git;a=commitdiff;h=5154fdaa344e6e8e3243d5c9cef7955c512f4074;hp=23e1978aff5aeec01a03205f5a43b1f02911fd3b
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Feb 23 20:03:49 2017 +0000

    Add a config file mechanism, and move .caltrapdb.
    
    This is a BREAKING CHANGE to existing users, who will find that
    caltrap now expects to find its database file at ~/.caltrap/db instead
    of ~/.caltrapdb. However, the file format is unchanged, so it's only
    one 'mv' command to sort that out.
    
    The purpose of doing that is to keep things tidy, because alongside
    ~/.caltrap/db we now also support a file called ~/.caltrap/config,
    which we load and parse for configuration directives.
    
    As of this commit, no config directives are supported! But one will be
    along shortly.

 caltrap.h |  8 +++++++-
 error.c   | 13 +++++++++++++
 main.c    | 53 +++++++++++++++++++++++++++++++++++++++++++----------
 sqlite.c  |  3 +++
 4 files changed, 66 insertions(+), 11 deletions(-)

commit 8697488059767711c05c934fb045244864eee0ec
web diff https://git.tartarus.org/?p=simon/caltrap.git;a=commitdiff;h=8697488059767711c05c934fb045244864eee0ec;hp=5154fdaa344e6e8e3243d5c9cef7955c512f4074
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Feb 23 20:06:25 2017 +0000

    Support a 'pager' config option.
    
    This affects only list mode (caltrap -l), and causes the output to be
    piped through a pager command instead of sending it straight to
    standard output. The default behaviour is unchanged, but you can now
    put a line in ~/.caltrap/config saying 'pager less -FMRSX' (or
    similar) to cause caltrap -l to behave like various git commands, of
    just printing the output if it's shorter than a screenful but
    automatically shifting into pager mode if it's longer. So now I can
    list long time periods like 'caltrap -l 2017' without having to faff
    about with my terminal window's scrollback, or explicitly pipe
    anything through less.

 caltrap.h |  1 +
 list.c    | 20 +++++++++++++++-----
 main.c    | 11 ++++++++---
 3 files changed, 24 insertions(+), 8 deletions(-)

commit fd862d3207948b95a45bb569d43e248906413672
web diff https://git.tartarus.org/?p=simon/caltrap.git;a=commitdiff;h=fd862d3207948b95a45bb569d43e248906413672;hp=8697488059767711c05c934fb045244864eee0ec
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu Feb 23 20:08:26 2017 +0000

    Support date aliases 'yesterday', 'today' and 'tomorrow'.
    
    The existing syntax '-1', '+0' and '+1' is no different, but the
    friendly names are friendlier. (And it should be easier to remember
    that they're a supported syntax in the first place; 'today' was what I
    tried typing first this morning, before looking at the source and
    reminding myself that I'd made '+0' work many years ago.)

 datetime.c | 6 ++++++
 1 file changed, 6 insertions(+)



More information about the tartarus-commits mailing list