Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bashhub-client
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 22
    • Issues 22
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Ryan Caloras
  • bashhub-client
  • Wiki
  • Usage

Usage · Changes

Page history
Fixing markdown authored Aug 30, 2017 by Ryan Caloras's avatar Ryan Caloras
Hide whitespace changes
Inline Side-by-side
Usage.md
View page @ 9a637022
##Command Structure ## Command Structure
Bashhub can be accessed from the command line in a couple ways: Bashhub can be accessed from the command line in a couple ways:
- `bh` for searching - `bh` for searching
...@@ -9,7 +9,7 @@ It also provides a key binding of `ctrl + b` for quickly dropping into interacti ...@@ -9,7 +9,7 @@ It also provides a key binding of `ctrl + b` for quickly dropping into interacti
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! 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!
##Interactive Search ## 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. 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.
Here's an example of interactive search followed by bashhub status. Here's an example of interactive search followed by bashhub status.
...@@ -22,7 +22,7 @@ From interactive search you can also access detailed information on each command ...@@ -22,7 +22,7 @@ From interactive search you can also access detailed information on each command
![Command Details](https://i.imgur.com/is0gNnB.png) ![Command Details](https://i.imgur.com/is0gNnB.png)
##Searching Examples ## Searching Examples
The last 100 commands you executed anywhere. (100 is default limit without `-n`) The last 100 commands you executed anywhere. (100 is default limit without `-n`)
```bash ```bash
...@@ -41,7 +41,7 @@ Find that wget command with interactive search to execute it again :P ...@@ -41,7 +41,7 @@ Find that wget command with interactive search to execute it again :P
$ bh -i "wget github" $ bh -i "wget github"
``` ```
###Directory based searching ### Directory based searching
The last commands you executed in this directory. The last commands you executed in this directory.
...@@ -62,7 +62,7 @@ $ bh -i -d ...@@ -62,7 +62,7 @@ $ bh -i -d
(bashhub-i-search): rsync (bashhub-i-search): rsync
``` ```
###System based searching ### System based searching
The last 10 curl commands you produced on this system The last 10 curl commands you produced on this system
...@@ -70,7 +70,7 @@ The last 10 curl commands you produced on this system ...@@ -70,7 +70,7 @@ The last 10 curl commands you produced on this system
$ bh -sys -n 10 "curl" $ bh -sys -n 10 "curl"
``` ```
###How search results are ordered ### How search results are ordered
By default results are sorted by **most recently** used, and are **unique**. This means frequent commands like `git status` or `ls` will only appear once in the position they were most recently invoked. By default results are sorted by **most recently** used, and are **unique**. This means frequent commands like `git status` or `ls` will only appear once in the position they were most recently invoked.
This can be altered by using the `-dups` command to include duplicates This can be altered by using the `-dups` command to include duplicates
...@@ -81,7 +81,7 @@ Your git commands including duplicates. ...@@ -81,7 +81,7 @@ Your git commands including duplicates.
$ bh -dups "git" $ bh -dups "git"
``` ```
##Bashhub Status ## Bashhub Status
You can get a summary of your user's stats/status by using the `status` command. You can get a summary of your user's stats/status by using the `status` command.
```bash ```bash
...@@ -102,7 +102,7 @@ Commands In Session: 3 ...@@ -102,7 +102,7 @@ Commands In Session: 3
Commands Today: 47 Commands Today: 47
``` ```
##Deleting Commands ## Deleting Commands
You can delete commands from Bashhub through interactive search by pressing `Delete` or `Backspace` while a command is highlighted. A small dialog box will open to confirm the commands deletion. If a command is deleted, it is permanently removed from Bashhub. You can delete commands from Bashhub through interactive search by pressing `Delete` or `Backspace` while a command is highlighted. A small dialog box will open to confirm the commands deletion. If a command is deleted, it is permanently removed from Bashhub.
![gif](https://i.imgur.com/sHzvEJx.gif) ![gif](https://i.imgur.com/sHzvEJx.gif)
...@@ -128,7 +128,7 @@ Is Filtered. Matched ['-p'] ...@@ -128,7 +128,7 @@ Is Filtered. Matched ['-p']
``` ```
##Disabling recording commands ## Disabling recording commands
You can turn on/off recording to Bashhub via `bashhub on` and `bashhub off`. By default this only affects the current bash session. You can turn on/off recording to Bashhub via `bashhub on` and `bashhub off`. By default this only affects the current bash session.
```bash ```bash
...@@ -140,7 +140,7 @@ $ echo "Recording commands is now re-enabled" ...@@ -140,7 +140,7 @@ $ echo "Recording commands is now re-enabled"
``` ```
You can disable for all sessions by setting `bashhub off --global` this sets `save_commands = False` in your bashhub config. You can disable for all sessions by setting `bashhub off --global` this sets `save_commands = False` in your bashhub config.
##Ignoring Commands ## Ignoring Commands
`#ignore` added to any command will omit it from being saved. Simply add it to the end of any command and it won't be recorded in Bashhub. `#ignore` added to any command will omit it from being saved. Simply add it to the end of any command and it won't be recorded in Bashhub.
```bash ```bash
......
Clone repository
  • FAQ
  • Home
  • Install
  • Security and Privacy
  • Usage