... | ... | @@ -5,35 +5,53 @@ Bashhub can be accessed from the command line in a couple ways: |
|
|
- `bashhub` for everything else
|
|
|
|
|
|
It also provides a key binding of `ctrl + b` for quickly dropping into interactive search.
|
|
|
##Search
|
|
|
You can search through your commands in a lot of different ways. Check `bh --help` for more specifics. By default `bh` will output the most recently used unique commands to standard out. Adding the `-i` argument to any `bh` search will make it **interactive**. There are also several arguments to pass to filter, query, and get more specific about your searches!
|
|
|
|
|
|
##Searching
|
|
|
You can search through your commands in a lot of different ways. Check `bh --help` for more specifics.
|
|
|
|
|
|
Here's some examples:
|
|
|
##Interactive Search
|
|
|
One of the most useful features is interactive search which is accessed via `bh -i` or `ctrl+b`. This is similar to reverse search i.e. `ctrl + r`. Interactive search drops you into a small menu where you can select a command to run on the command line.
|
|
|
|
|
|
###Directory based searching
|
|
|
Enter interactive search for all the rsync commands executed in this directory
|
|
|
```bash
|
|
|
$ bh -i -d
|
|
|
(bashhub-i-search): rsync
|
|
|
```
|
|
|
Here's an example of interactive search followed by bashhub status.
|
|
|
![gif](http://i.imgur.com/fCIYlfO.gif)
|
|
|
|
|
|
All the files you vim'd in this current directory.
|
|
|
##Searching Examples
|
|
|
|
|
|
The last 100 commands you executed anywhere. (100 is default limit without `-n`)
|
|
|
```bash
|
|
|
$ bh -d "vim"
|
|
|
$ bh
|
|
|
```
|
|
|
|
|
|
###System based searching
|
|
|
|
|
|
The last 10 curl commands you produced on this system
|
|
|
The last 20 files I've grep'd.
|
|
|
```bash
|
|
|
$ bh -n 20 "grep"
|
|
|
```
|
|
|
Find that wget command with interactive search to execute it again :P
|
|
|
```bash
|
|
|
$ bh -i "wget github"
|
|
|
```
|
|
|
###Directory based searching
|
|
|
|
|
|
The last commands you executed in this directory.
|
|
|
```bash
|
|
|
$ bh -sys -n 10 "curl"
|
|
|
$ bh -d
|
|
|
```
|
|
|
The last 10 things you vim'd in this directory
|
|
|
```bash
|
|
|
$ bh -d -n 10 "vim"
|
|
|
```
|
|
|
|
|
|
##Interactive Search
|
|
|
One of the most useful features is interactive search which is accessed via `bh -i` or `ctrl+b`. This is similar to reverse search i.e. `ctrl + r`. Interactive search drops you into a small menu where you can select a command to run on the command line.
|
|
|
###System based searching
|
|
|
|
|
|
The last 10 curl commands you produced on this system
|
|
|
|
|
|
Enter interactive search for all the rsync commands executed in this directory
|
|
|
```bash
|
|
|
$ bh -i -d
|
|
|
(bashhub-i-search): rsync
|
|
|
$ bh -sys -n 10 "curl"
|
|
|
```
|
|
|
|
|
|
###How search results are ordered
|
... | ... | |