help-recutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[help-recutils] Suggestions on recutils CLI


From: Paul Rankin
Subject: [help-recutils] Suggestions on recutils CLI
Date: Tue, 5 May 2015 15:45:23 +1000

Thank you for creating/maintaining recutils. I was searching for a 
human-readable plaintext database system for what felt like years...

I've been using recutils for a couple of months now and, if I may, I'd like to 
offer some suggestions. A few of these ideas come directly from John Wiegley's 
similar-in-spirit ledger program.


* $REC_FILE environment variable

For those mostly working on a single database, having to repeat the filename 
can become tedious. ledger gets around this by allowing a LEDGER_FILE, which 
can be overridden with a flag and filename on the CLI. Alternately, the default 
database file could be set in a global ~/.rec config file.

My current hackish workaround is a line in my profile:
    alias recsel="recsel -i ~/Documents/mydb.rec"


* Globally set --case-insensitive option

I feel like case sensitively is the exception rather than the rule, hence the 
alias above sets the -i option whenever I call recsel. Another reason for a 
~/.rec file?

(I am current in my thinking that there is no global config file already?)


* Long results could be piped through less

Just a matter of convenience. I'm usually piping queries through less anyway, 
but it's usually a case of query then "oh bother" then query | less.


* Tabulated output

I managed to achieve tabulated output with the following...

    $ recsel FILE -t TYPE | rec2csv | column -t -s ',' | tr -d \"

One problem with this method is that column does not honour quoted input, 
meaning that any commas within values are treated as new columns.

Again just a matter of convenience, it would be great to tabulated output with 
just a single -T flag?


* RADICAL IDEA WARNING! recutils as a single modular command

Similar to the way ledger or git works, you might have...

    $ rec select ...
    $ rec format ...
    $ rec insert ...

...with the command as the smallest unique substring, e.g. select and sel would 
be equivalent.


That's all. I hope this wasn't too overbearing as I know receiving a lot of 
suggestions at once can feel like criticism, but I really love recutils.

Warm regards,

Paul Rankin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]