diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-04-09 00:08:26 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-04-09 00:08:26 -0700 |
| commit | 9114b41b98683a1c49ce2d8c197022606ec44cfe (patch) | |
| tree | b2e7a4e0123e822f762abb4b8457aebbed1caac1 /API.md | |
| parent | e0a30fe02bf1c75ebd211dd8f3defa6241c5b82b (diff) | |
Version bump and documentation updates.
Diffstat (limited to 'API.md')
| -rw-r--r-- | API.md | 21 |
1 files changed, 17 insertions, 4 deletions
@@ -9,9 +9,23 @@ internal state. ## Helper Functions -- `bbask [-1] [prompt [initial]]`: get user input in a standardized and +`bb` is bundled with some helper scripts for performing common tasks. These +scripts are installed to `/etc/xdg/bb/`, which is added to `bb`'s `$PATH` +environment variable at runtime. `~/.config/bb/` is also added to the `$PATH` +with higher priority, so you can override any of these scripts by putting your +own version there. + +- `bbstartup`: The script run when `bb` first launches. It calls `bbbindkeys` by + default and sets up some configuration settings like which columns to display. +- `bbbindkeys`: The script called by `bb` to create all of `bb`'s key bindings. + It's currently very hacky, but it amounts to a bunch of calls to `bbcmd + bind:<key>:<script>` +- `bbshutdown`: The script run when `bb` exits. The default implementation saves + the current configuration settings to `~/.local/share/bb/settings.sh`, which + is run by `bbstartup` to restore the settings at launch. +- `bbask [-1] [prompt [initial]]`: Get user input in a standardized and customizable way and output it to `STDOUT`. -- `bbcmd <cmd>*`: used for modifying `bb`'s internal state (see BB Commands). +- `bbcmd <cmd>*`: Modify`bb`'s internal state (see BB Commands). - `bbconfirm [prompt]`: Display a "Is this okay? [y/N]" prompt and exit with failure if the user does not press 'y'. - `bbpause`: Display a "press any key to continue" message and wait for a keypress. @@ -24,8 +38,7 @@ internal state. ## Environment Variables -For startup commands and key bindings, the following values are provided as -environment variables: +When `bb` runs scripts, following values are provided as environment variables: - `$@` (the list of arguments): the full paths of the selected files - `$BBCURSOR`: the full path of the file under the cursor |
