diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-05-22 14:36:29 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-05-22 14:36:29 -0700 |
| commit | 73124fedf986e48b05dc4c86a9d58621d537fe17 (patch) | |
| tree | 6425ca8d28b2cd8fe8479dff18945f89bf3c6ff9 | |
| parent | 5f0e1bf0bed5e835fbe6b4af97701e30ebff598d (diff) | |
Updated readme
| -rw-r--r-- | README.md | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -17,12 +17,13 @@ feedback and rapid navigation. For example, instead of using `ls`, then `rm` and typing out file names, you can just open `bb`, scroll through the list of files, select the ones you want to delete, and hit `D`. The `D` key's behavior is defined in a single line of code -in `config.h` as piping the selected files to `xargs -0 rm -rf`. That's it! If -you want to add a mapping to upload files to your server, you can just add a -binding for `xargs -0 scp user@example.com`. Want to zip files? Add a mapping for -`xargs -0 zip "$(printf 'Zip file: ' >/dev/tty && head -n1 /dev/tty)"` or, if -you have some complicated one-time task, you can just hit `|` and type in any -arbitrary command and have the selected files piped to it. +in `config.h` as passing the selected files as arguments to `rm -rf "$@"`. +That's it! If you want to add a mapping to upload files to your server, you can +just add a binding for `scp user@example.com:~/ "$@"`. Want to zip files? Add +a mapping for `read -p "Archive: " name && zip "$name" "$@"` or, if you have +some complicated one-time task, you can just hit `>` to drop to a shell and run +commands with the selected files available in `$@` (or use `|` to run a quick +one-liner command that gets the selected files piped as input). ## Zero Dependencies @@ -57,9 +58,6 @@ editing `config.h` and recompiling. In [suckless](https://suckless.org/) style, customizing means editing source code, and compilation is extremely fast. Key character constants are in `keys.h` and the rest of the code is in `bb.c`. -If you want to get user input during a command (e.g. to get the name of a new file), -you can use `/dev/tty` like so: `touch "$(printf 'New file: ' >/dev/tty && head -n1 /dev/tty)"` - ## License `bb` is released under the MIT license. See the `LICENSE` file for full details. |
