add a %(text) variable
commitf1302c0780f834af1b8298029d1619118ab01388
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Sat, 21 Nov 2015 23:38:29 +0000 (21 18:38 -0500)
committerVivien Didelot <vivien.didelot@savoirfairelinux.com>
Sun, 22 Nov 2015 00:01:58 +0000 (21 19:01 -0500)
tree833f4022bcb9b2fd9e97ce187c9c5f40effe7b66
parent0ad33273cda5a4512346ac1f4c8e660988e27d77
add a %(text) variable

This exposes the text of the currently selected line as the %(text)
variable. Only the pager view is supported at the moment.

This is particularly handy for using Tig as a scriptable pager. For
instance, here's a dumb remote manager:

    $ echo 'bind pager <Enter> git remote show -n %(text)' >> ~/.tigrc
    $ echo 'bind pager U git remote update -p %(text)' >> ~/.tigrc
    $ git remote | tig

Pressing Enter shows remote information, pressing U fetches the remote.
doc/manual.adoc
doc/tigrc.5.adoc
include/tig/argv.h
src/pager.c