| File CONFIGURATION.md changed (mode: 100644) (index 99563f6..372681b) |
| ... |
... |
Get most of `hh` by configuring it with: |
| 4 |
4 |
```bash |
```bash |
| 5 |
5 |
hh --show-configuration >> ~/.bashrc |
hh --show-configuration >> ~/.bashrc |
| 6 |
6 |
``` |
``` |
| 7 |
|
You may want to check: |
|
| 8 |
|
```bash |
|
| 9 |
|
hh --show-configuration |
|
| 10 |
|
``` |
|
| 11 |
|
to determine what will be appended to your BASH profile. |
|
|
7 |
|
Run `hh --show-configuration` to determine what will be appended to your BASH profile. |
| 12 |
8 |
|
|
| 13 |
9 |
This document describes `hh` related configuration in detail - |
This document describes `hh` related configuration in detail - |
| 14 |
|
[binding hh to keyword shortcuts](#binding-hh-to-keyboard-shortcut), |
|
|
10 |
|
[binding hh to a keyboard shortcut](#binding-hh-to-keyboard-shortcut), |
| 15 |
11 |
[colors](#colors), |
[colors](#colors), |
| 16 |
|
[default history view](#history-view) |
|
|
12 |
|
[default history view](#history-view), |
|
13 |
|
[verbosity](#verbosity), |
| 17 |
14 |
[BASH history settings](#bash-history-settings) |
[BASH history settings](#bash-history-settings) |
| 18 |
15 |
and [examples](#examples). |
and [examples](#examples). |
| 19 |
16 |
|
|
| |
| ... |
... |
or `Ctrl-F12`: |
| 33 |
30 |
```bash |
```bash |
| 34 |
31 |
bind '"\e[24;5~":"\C-ahh \C-j"' |
bind '"\e[24;5~":"\C-ahh \C-j"' |
| 35 |
32 |
``` |
``` |
| 36 |
|
bind `hh` to `Ctrl-r` only if this is interactive shell: |
|
|
33 |
|
Bind `hh` to `Ctrl-r` only if it is interactive shell: |
| 37 |
34 |
```bash |
```bash |
| 38 |
35 |
if [[ $- =~ .*i.* ]]; then bind '"\C-r": "\C-a hh \C-j"'; fi |
if [[ $- =~ .*i.* ]]; then bind '"\C-r": "\C-a hh \C-j"'; fi |
| 39 |
36 |
``` |
``` |
| |
| ... |
... |
Get `hh` in more colors: |
| 50 |
47 |
```bash |
```bash |
| 51 |
48 |
export HH_CONFIG=hicolor |
export HH_CONFIG=hicolor |
| 52 |
49 |
``` |
``` |
| 53 |
|
or in black and white mode: |
|
|
50 |
|
or ensure black and white mode: |
| 54 |
51 |
```bash |
```bash |
| 55 |
52 |
export HH_CONFIG=monochromatic |
export HH_CONFIG=monochromatic |
| 56 |
53 |
``` |
``` |
| |
| ... |
... |
Show normal history by default (instead of metrics-based view): |
| 61 |
58 |
```bash |
```bash |
| 62 |
59 |
export HH_CONFIG=rawhistory |
export HH_CONFIG=rawhistory |
| 63 |
60 |
``` |
``` |
| 64 |
|
show favorites by default (instead of metrics-based view): |
|
|
61 |
|
Show favorite commands by default (instead of metrics-based view): |
| 65 |
62 |
```bash |
```bash |
| 66 |
63 |
export HH_CONFIG=favorites |
export HH_CONFIG=favorites |
| 67 |
64 |
``` |
``` |
| 68 |
65 |
|
|
| 69 |
66 |
FILTERING |
FILTERING |
| 70 |
67 |
--------- |
--------- |
| 71 |
|
make search case sensitive (insensitive by default): |
|
|
68 |
|
Make search case sensitive (insensitive by default): |
| 72 |
69 |
```bash |
```bash |
| 73 |
70 |
export HH_CONFIG=casesensitive |
export HH_CONFIG=casesensitive |
| 74 |
71 |
``` |
``` |
| 75 |
72 |
|
|
| 76 |
|
VERBOSE |
|
|
73 |
|
VERBOSITY |
| 77 |
74 |
------- |
------- |
| 78 |
|
show warnings: |
|
|
75 |
|
Show warnings: |
| 79 |
76 |
```bash |
```bash |
| 80 |
77 |
export HH_CONFIG=warning |
export HH_CONFIG=warning |
| 81 |
78 |
``` |
``` |
| 82 |
|
show debug messages: |
|
|
79 |
|
Show debug messages: |
| 83 |
80 |
```bash |
```bash |
| 84 |
81 |
export HH_CONFIG=debug |
export HH_CONFIG=debug |
| 85 |
82 |
``` |
``` |
| 86 |
83 |
|
|
| 87 |
84 |
EXAMPLES |
EXAMPLES |
| 88 |
85 |
-------- |
-------- |
| 89 |
|
`hh` configuration examples. |
|
| 90 |
|
|
|
| 91 |
86 |
More colors with case sensitive search of history: |
More colors with case sensitive search of history: |
| 92 |
87 |
```bash |
```bash |
| 93 |
88 |
export HH_CONFIG=hicolor,casesensitive |
export HH_CONFIG=hicolor,casesensitive |
| |
| ... |
... |
BASH HISTORY SETTINGS |
| 106 |
101 |
--------------------- |
--------------------- |
| 107 |
102 |
Use the following BASH settings to get most out of `hh`. |
Use the following BASH settings to get most out of `hh`. |
| 108 |
103 |
|
|
| 109 |
|
Increase the size of history: |
|
|
104 |
|
Increase the size of history maintained by BASH - variables defined below increase the |
|
105 |
|
number of history items and history file size (default value is 500): |
| 110 |
106 |
```bash |
```bash |
| 111 |
107 |
export HISTFILESIZE=10000 |
export HISTFILESIZE=10000 |
| 112 |
108 |
export HISTSIZE=${HISTFILESIZE} |
export HISTSIZE=${HISTFILESIZE} |
| 113 |
109 |
``` |
``` |
| 114 |
|
Variables defined above increase the number of history items and history file size |
|
| 115 |
|
(default value is 500). |
|
| 116 |
|
|
|
| 117 |
110 |
Ensure syncing (flushing and reloading) of `.bash_history` with in-memory |
Ensure syncing (flushing and reloading) of `.bash_history` with in-memory |
| 118 |
111 |
history: |
history: |
| 119 |
112 |
```bash |
```bash |