Documentation polishing.

This commit is contained in:
Martin Dvorak 2015-01-07 23:44:07 +01:00
parent 3b17f01bd1
commit 86f063cb34
2 changed files with 15 additions and 22 deletions

View file

@ -4,16 +4,13 @@ Get most of `hh` by configuring it with:
```bash ```bash
hh --show-configuration >> ~/.bashrc hh --show-configuration >> ~/.bashrc
``` ```
You may want to check: Run `hh --show-configuration` to determine what will be appended to your BASH profile.
```bash
hh --show-configuration
```
to determine what will be appended to your BASH profile.
This document describes `hh` related configuration in detail - This document describes `hh` related configuration in detail -
[binding hh to keyword shortcuts](#binding-hh-to-keyboard-shortcut), [binding hh to a keyboard shortcut](#binding-hh-to-keyboard-shortcut),
[colors](#colors), [colors](#colors),
[default history view](#history-view) [default history view](#history-view),
[verbosity](#verbosity),
[BASH history settings](#bash-history-settings) [BASH history settings](#bash-history-settings)
and [examples](#examples). and [examples](#examples).
@ -33,7 +30,7 @@ or `Ctrl-F12`:
```bash ```bash
bind '"\e[24;5~":"\C-ahh \C-j"' bind '"\e[24;5~":"\C-ahh \C-j"'
``` ```
bind `hh` to `Ctrl-r` only if this is interactive shell: Bind `hh` to `Ctrl-r` only if it is interactive shell:
```bash ```bash
if [[ $- =~ .*i.* ]]; then bind '"\C-r": "\C-a hh \C-j"'; fi if [[ $- =~ .*i.* ]]; then bind '"\C-r": "\C-a hh \C-j"'; fi
``` ```
@ -50,7 +47,7 @@ Get `hh` in more colors:
```bash ```bash
export HH_CONFIG=hicolor export HH_CONFIG=hicolor
``` ```
or in black and white mode: or ensure black and white mode:
```bash ```bash
export HH_CONFIG=monochromatic export HH_CONFIG=monochromatic
``` ```
@ -61,33 +58,31 @@ Show normal history by default (instead of metrics-based view):
```bash ```bash
export HH_CONFIG=rawhistory export HH_CONFIG=rawhistory
``` ```
show favorites by default (instead of metrics-based view): Show favorite commands by default (instead of metrics-based view):
```bash ```bash
export HH_CONFIG=favorites export HH_CONFIG=favorites
``` ```
FILTERING FILTERING
--------- ---------
make search case sensitive (insensitive by default): Make search case sensitive (insensitive by default):
```bash ```bash
export HH_CONFIG=casesensitive export HH_CONFIG=casesensitive
``` ```
VERBOSE VERBOSITY
------- -------
show warnings: Show warnings:
```bash ```bash
export HH_CONFIG=warning export HH_CONFIG=warning
``` ```
show debug messages: Show debug messages:
```bash ```bash
export HH_CONFIG=debug export HH_CONFIG=debug
``` ```
EXAMPLES EXAMPLES
-------- --------
`hh` configuration examples.
More colors with case sensitive search of history: More colors with case sensitive search of history:
```bash ```bash
export HH_CONFIG=hicolor,casesensitive export HH_CONFIG=hicolor,casesensitive
@ -106,14 +101,12 @@ BASH HISTORY SETTINGS
--------------------- ---------------------
Use the following BASH settings to get most out of `hh`. Use the following BASH settings to get most out of `hh`.
Increase the size of history: Increase the size of history maintained by BASH - variables defined below increase the
number of history items and history file size (default value is 500):
```bash ```bash
export HISTFILESIZE=10000 export HISTFILESIZE=10000
export HISTSIZE=${HISTFILESIZE} export HISTSIZE=${HISTFILESIZE}
``` ```
Variables defined above increase the number of history items and history file size
(default value is 500).
Ensure syncing (flushing and reloading) of `.bash_history` with in-memory Ensure syncing (flushing and reloading) of `.bash_history` with in-memory
history: history:
```bash ```bash

View file

@ -32,11 +32,11 @@ or [Mac OS](INSTALLATION.md#mac-os).
CONFIGURATION CONFIGURATION
------------- -------------
You can configure `hh` just by running: Optionally configure `hh` just by running:
```bash ```bash
hh --show-configuration >> ~/.bashrc hh --show-configuration >> ~/.bashrc
``` ```
For detailed `hh` configuration description please refer to [Configuration](CONFIGURATION.md). For detailed `hh` configuration documentation please refer to [Configuration](CONFIGURATION.md).
DOCUMENTATION DOCUMENTATION