aboutsummaryrefslogtreecommitdiff
path: root/API.md
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-11-11 12:29:40 -0800
committerBruce Hill <bruce@bruce-hill.com>2019-11-11 12:29:40 -0800
commitb7ad0e93a243da19e39fc750054afcfa3c6bb9b0 (patch)
tree33295fb95c09d02e9d3afed9e68ef28c3a415107 /API.md
parentaf3f6421500dfeb58b8ac251edf639552e48b762 (diff)
Refactored `bb +...` to `bbcmd ...` within bb bindings. This makes
things a lot less ambiguous. Also removed the default marks created in bbstartup.sh and ensured that `$XDG_DATA_HOME` and `$XDG_CONFIG_HOME` always get set as environment variables.
Diffstat (limited to 'API.md')
-rw-r--r--API.md25
1 files changed, 13 insertions, 12 deletions
diff --git a/API.md b/API.md
index 0b21c36..2d4af06 100644
--- a/API.md
+++ b/API.md
@@ -36,7 +36,7 @@ environment variables:
## BB Internal State Commands
-In order to modify bb's internal state, you can call `bb +cmd`, where "cmd"
+In order to modify bb's internal state, you can call `bbcmd <cmd>`, where "cmd"
is one of the following commands (or a unique prefix of one):
- `.:[01]` Whether to show "." in each directory
@@ -57,10 +57,10 @@ is one of the following commands (or a unique prefix of one):
- `spread:<num*>` Spread the selection state at the cursor
- `toggle:<filename>` Toggle the selection status of <filename>
-For any of these commands (e.g. `+select`), an empty parameter followed by
-additional arguments (e.g. `bb +select: <file1> <file2> ...`) is equivalent to
-repeating the command with each argument (e.g. `bb +select:<file1>
-+select:<file2> ...`).
+For any of these commands (e.g. `select`), an empty parameter followed by
+additional arguments (e.g. `bbcmd select: <file1> <file2> ...`) is equivalent to
+repeating the command with each argument (e.g. `bbcmd select:<file1>
+select:<file2> ...`).
Note: for numeric-based commands (like scroll), the number can be either an
absolute value or a relative value (starting with `+` or `-`), and/or a percent
@@ -70,12 +70,13 @@ height down, and `100%n` means the last file)
## Final Notes
-Internally, `bb` writes the commands (NUL terminated) to a file whose path is
-in`$BBCMD` and reads from that file when `bb` resumes. These commands can also
-be passed to bb at startup, and will run immediately. E.g. `bb '+col:n'
-'+sort:+r' .` will launch `bb` only showing the name column, randomly sorted.
+Internally, `bbcmd` writes the commands (NUL terminated) to a file whose path is
+in`$BBCMD` and `bb` reads from that file when it resumes. These commands can also
+be passed to `bb` at startup as command line arugments starting with `+`, and
+will run immediately. E.g. `bbcmd +'col:n' +'sort:+r' .` will launch `bb` only
+showing the name column, randomly sorted.
-`bb` also optimizes any scripts that only contain just a `bb` command and no
-shell variables, other commands, etc. (e.g. `bb +move:+1`) These
-`bb`-command-only scripts directly modify `bb`'s internal state without
+`bb` also optimizes any scripts that only contain just a `bbcmd` command and no
+shell variables, other commands, etc. (e.g. `bbcmd move:+1`) These
+`bbcmd`-command-only scripts directly modify `bb`'s internal state without
spawning a shell, so they're much faster and avoid flickering the screen.