Skip to content

Commit

Permalink
Cfg: fixing matching configuration names #309
Browse files Browse the repository at this point in the history
  • Loading branch information
dvorka committed Aug 26, 2018
1 parent 32ccdab commit 7d6a6b0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
26 changes: 23 additions & 3 deletions CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ or ensure black and white mode:
export HH_CONFIG=monochromatic
```

## History View
## Default History View
Show normal history by default (instead of metrics-based view):

```bash
Expand All @@ -84,13 +84,33 @@ export HH_CONFIG=favorites-view
```

## Filtering
To use regular expressions based matching:

```bash
export HH_CONFIG=regexp-matching
```

To use substring based matching:

```bash
export HH_CONFIG=substring-matching
```

To use keywords (substrings whose order doesn't matter) search matching (default):

```bash
export HH_CONFIG=keywords-matching
```

---

Make search case sensitive (insensitive by default):

```bash
export HH_CONFIG=casesensitive
export HH_CONFIG=case-sensitive
```

Keep duplicates in `rawhistory` view (duplicates discarded by default):
Keep duplicates in `raw-history-view` (duplicate commands are discarded by default):

```bash
export HH_CONFIG=duplicates
Expand Down
6 changes: 3 additions & 3 deletions man/hstr.1
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ Configuration options:
\fInoconfirm\fR
Do not ask for confirmation on a history entry delete (default is with confirmation).

\fIregexp\fR
\fIregexp-matching\fR
Filter command history using regular expressions.

\fIsubstring\fR
\fIsubstring-matching\fR
Filter command history using substring.

\fIkeywords\fR
\fIkeywords-matching\fR
Filter command history using keywords - item matches if contains all keywords in pattern in any order (keywords match is default).

\fIcasesensitive\fR
Expand Down
6 changes: 3 additions & 3 deletions src/hstr.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
#define HSTR_CONFIG_FAVORITES "favorites-view"
#define HSTR_CONFIG_SORTING "raw-history-view"
#define HSTR_CONFIG_CASE "casesensitive"
#define HSTR_CONFIG_REGEXP "regexp"
#define HSTR_CONFIG_SUBSTRING "substring"
#define HSTR_CONFIG_KEYWORDS "keywords"
#define HSTR_CONFIG_REGEXP "regexp-matching"
#define HSTR_CONFIG_SUBSTRING "substring-matching"
#define HSTR_CONFIG_KEYWORDS "keywords-matching"
#define HSTR_CONFIG_NOCONFIRM "noconfirm"
#define HSTR_CONFIG_VERBOSE_KILL "verbose-kill"
#define HSTR_CONFIG_PROMPT_BOTTOM "prompt-bottom"
Expand Down

0 comments on commit 7d6a6b0

Please sign in to comment.