bin-client/README.md

32 lines
971 B
Markdown
Raw Normal View History

2019-05-11 12:44:27 +02:00
# bin-client
2018-11-07 10:56:15 +01:00
2019-05-11 12:41:19 +02:00
Command line client for [mkr/bin](https://github.com/MKRhere/bin) and
[hastebin](https://github.com/seejohnrun/haste-server/). Uses
2018-11-16 10:51:44 +01:00
[bin.mkr.pw](https://bin.mkr.pw) as the default instance.
## Requirements
+ xclip (for copying url into clipboard)
+ curl
## Usage
Copy `mbin.sh` to your PATH or add an alias to point to the absolute path of
`mbin.sh`.
```bash
some_command | mbin.sh
mbin.sh # Opens in interactive mode.
2018-11-16 10:56:30 +01:00
mbin.sh -c # Posts clipboard contents to bin
mbin.sh --clipboard # Posts clipboard contents to bin
2018-11-16 10:51:44 +01:00
```
## Customization
2019-05-11 12:41:19 +02:00
+ To use custom instance, export `MKR_BIN` variable. Also, set `HASTEBIN=1` if
it is a hastebin instance.
2018-11-16 10:51:44 +01:00
+ Add `export MKR_BIN="https://bin.example.com/"` (Ensure to keep the
trailing slash) in your shell rc (`~/.bashrc` if using bash).
+ To use an editor other than vim in interactive mode, export `EDITOR` variable.
+ Add `export EDITOR=micro` in your shell rc (`~/.bashrc` if using bash).