For this, we needed a wire protocol. After surveying available options,
it was decided to implement an XDR-like protocol code generator
in portable AWK. It now has two backends, per each of:
- xF, the X11 frontend, is in C, and is meant to be the primary
user interface in the future.
- xP, the web frontend, relies on a protocol proxy written in Go,
and is meant for use on-the-go (no pun intended).
They are very much work-in-progress proofs of concept right now,
and the relay protocol is certain to change.
Those would not work, so skip the first forward slash.
Note that liberty can save arbitrary alias names since 6e93119,
making the removed comment about checking outdated.
This commit constitutes a breaking change to old configurations.
All behaviour.* options have now become general.*, with the following
few renames as exceptions:
- editor_command -> editor
- backlog_helper -> pager
- backlog_helper_strip_formatting -> pager_strip_formatting
Snippets now receive positional parameters in the form of the buffer's
name in the locale encoding, and a filename if applicable
(we keep passing stdin along with the filename, which happens to
work out well for less(1)).
The default value of the configuration option also no longer uses
the "long prompt", which used to unhelpfully tell position in terms
of lines, but rather sets its own prompt that counts pages,
and makes sure to indicate the source buffer.
The main motivation behind this change is to make the 'v' command
work in less(1). LESSSECURE must be omitted from the snippet
for this to work.
Bump liberty to receive a config parser that allows for less
convoluted escaping.
Add a configuration option to set a custom editor command,
different from EDITOR or VISUAL--those remain as defaults.
Implement substitutions allowing to convey cursor information
to VIM and Emacs (the latter of which is fairly painful to cater to),
and put usage hints in the configuration option's description.
This should make the editing experience a bit more seamless
for users, even though the position is carried over in one way only.
No sophisticated quoting capabilities were deemed necessary,
it is a lot of code already. The particular syntax is inspired
by .desktop files and systemd.
["/bin/sh", "-c", "vim +$2go \"$1\"", filename, position, line, column]
would be a slightly simpler but cryptic way of implementing this.