README: add more usage info - sob - simple output bar
(HTM) git clone git://git.codemadness.org/sob
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit fb069221b7b7433cbccc6144388d7f5c3179a44a
(DIR) parent 088944cffaac6c5ae538ad8f611a48d54f90783c
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 26 Oct 2014 12:30:44 +0000
README: add more usage info
Diffstat:
M README | 39 +++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/README b/README
@@ -23,6 +23,45 @@ Features
- Yank line (xsel).
+Install
+-------
+
+ $ make
+ # make install
+
+optionally copy the scripts from the scripts/ directory to:
+"$HOME/.sob/scripts/".
+
+
+Usage
+-----
+
+ printf 'initial input' | sob -p 'Prompt: ' > file
+
+the interface will be printed to stderr (fd 2), the input will be printed to
+stdout (fd 1).
+
+Sob will interpret the "initial input" as keys so the keybinds in config.h
+will work. For example:
+
+ printf 'hai\x01' | sob > /dev/null
+
+Will have the initial input "hai" and move the cursor to the beginning of the
+line (\x01 is Ctrl-a).
+
+
+Scripting
+---------
+
+Sob will write to the process stdin using a pipe. What it writes depends on
+the context. It can be the current word (line_wordpipeto) or line (line_pipeto).
+
+Environment variables set for scripts (see config.h):
+
+$SOBLINE the current text of the line.
+$SOBWRITE the string also written to the process stdin.
+
+
Known issues
------------
- Line yank doesn't work with xclip, but does work with xsel.