File CONFIGURATION.md changed (mode: 100644) (index b2d0148..1c2a271) |
1 |
1 |
CONFIGURATION |
CONFIGURATION |
2 |
2 |
============= |
============= |
3 |
|
This document describes HSTR related configuration in detail: |
|
4 |
|
* bind hh command to a [keyboard shortcut](#binding-hh-to-keyboard-shortcut) |
|
5 |
|
* [colors](#colors) |
|
6 |
|
* [default history view](#history-view) |
|
7 |
|
* [verbosity](#verbosity) |
|
8 |
|
* [Bash history settings](#bash-history-settings) |
|
9 |
|
* [zsh history settings](#zsh-history-settings) |
|
10 |
|
* [examples](#examples) |
|
11 |
|
|
|
12 |
3 |
Get most of HSTR by configuring it with: |
Get most of HSTR by configuring it with: |
13 |
4 |
```bash |
```bash |
14 |
5 |
hh --show-configuration >> ~/.bashrc |
hh --show-configuration >> ~/.bashrc |
15 |
6 |
``` |
``` |
16 |
7 |
Run `hh --show-configuration` to determine what will be appended to your Bash profile. |
Run `hh --show-configuration` to determine what will be appended to your Bash profile. |
17 |
8 |
|
|
|
9 |
|
For more configuration options details please refer to: |
|
10 |
|
* bind `hh` command to a [keyboard shortcut](#binding-hh-to-keyboard-shortcut) |
|
11 |
|
* get more [colors](#colors) |
|
12 |
|
* choose [default history view](#history-view) |
|
13 |
|
* [verbosity](#verbosity) |
|
14 |
|
* [Bash history settings](#bash-history-settings) |
|
15 |
|
* [zsh history settings](#zsh-history-settings) |
|
16 |
|
|
|
17 |
|
Check also configuration [examples](#examples). |
18 |
18 |
|
|
19 |
19 |
|
|
20 |
20 |
BINDING HSTR TO KEYBOARD SHORTCUT |
BINDING HSTR TO KEYBOARD SHORTCUT |
|
... |
... |
or ensure black and white mode: |
79 |
79 |
export HH_CONFIG=monochromatic |
export HH_CONFIG=monochromatic |
80 |
80 |
``` |
``` |
81 |
81 |
|
|
|
82 |
|
|
82 |
83 |
HISTORY VIEW |
HISTORY VIEW |
83 |
84 |
------------ |
------------ |
84 |
85 |
Show normal history by default (instead of metrics-based view): |
Show normal history by default (instead of metrics-based view): |
|
... |
... |
Show favorite commands by default (instead of metrics-based view): |
90 |
91 |
export HH_CONFIG=favorites |
export HH_CONFIG=favorites |
91 |
92 |
``` |
``` |
92 |
93 |
|
|
|
94 |
|
|
93 |
95 |
FILTERING |
FILTERING |
94 |
96 |
--------- |
--------- |
95 |
97 |
Make search case sensitive (insensitive by default): |
Make search case sensitive (insensitive by default): |
|
... |
... |
Show debug messages: |
108 |
110 |
export HH_CONFIG=debug |
export HH_CONFIG=debug |
109 |
111 |
``` |
``` |
110 |
112 |
|
|
111 |
|
EXAMPLES |
|
112 |
|
-------- |
|
113 |
|
More colors with case sensitive search of history: |
|
114 |
|
```bash |
|
115 |
|
export HH_CONFIG=hicolor,casesensitive |
|
116 |
|
``` |
|
117 |
|
Favorite commands view in black and white: |
|
118 |
|
```bash |
|
119 |
|
export HH_CONFIG=favorites,monochromatic |
|
120 |
|
``` |
|
121 |
|
Keywords based search in colors with debug mode verbosity: |
|
122 |
|
```bash |
|
123 |
|
export HH_CONFIG=keywords,hicolor,debug |
|
124 |
|
``` |
|
125 |
|
|
|
126 |
113 |
|
|
127 |
114 |
BASH HISTORY SETTINGS |
BASH HISTORY SETTINGS |
128 |
115 |
--------------------- |
--------------------- |
|
... |
... |
If you use `zsh`, set HISTFILE environment variable in ~/.zshrc: |
159 |
146 |
``` |
``` |
160 |
147 |
export HISTFILE=~/.zsh_history |
export HISTFILE=~/.zsh_history |
161 |
148 |
``` |
``` |
|
149 |
|
|
|
150 |
|
|
|
151 |
|
EXAMPLES |
|
152 |
|
-------- |
|
153 |
|
More colors with case sensitive search of history: |
|
154 |
|
```bash |
|
155 |
|
export HH_CONFIG=hicolor,casesensitive |
|
156 |
|
``` |
|
157 |
|
Favorite commands view in black and white: |
|
158 |
|
```bash |
|
159 |
|
export HH_CONFIG=favorites,monochromatic |
|
160 |
|
``` |
|
161 |
|
Keywords based search in colors with debug mode verbosity: |
|
162 |
|
```bash |
|
163 |
|
export HH_CONFIG=keywords,hicolor,debug |
|
164 |
|
``` |