From 51734abc4f250a841ab8de4eba43ed5d0054b8bd Mon Sep 17 00:00:00 2001 From: Martin Dvorak Date: Tue, 29 Dec 2015 23:21:40 +0100 Subject: [PATCH] Polishing duplicates elimination in raw view. --- CONFIGURATION.md | 5 +++++ doc/CODE.md | 8 ++++++++ man/hh.1 | 3 +++ src/hstr.c | 4 ++-- 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 doc/CODE.md diff --git a/CONFIGURATION.md b/CONFIGURATION.md index d93a2b3..1c2be50 100644 --- a/CONFIGURATION.md +++ b/CONFIGURATION.md @@ -99,6 +99,11 @@ Make search case sensitive (insensitive by default): ```bash export HH_CONFIG=casesensitive ``` +Keep duplicates in `rawhistory` view (duplicates discarded by default): +```bash +export HH_CONFIG=duplicates +``` + BLACKLIST --------- diff --git a/doc/CODE.md b/doc/CODE.md new file mode 100644 index 0000000..f337c55 --- /dev/null +++ b/doc/CODE.md @@ -0,0 +1,8 @@ +IMPLEMENTATION +============== + +Eclipse: +* "Type 'bool' could not be resolved" - Index -> Freshen All Files + +Remote debug: +* gdb server + Eclipse run configuration (see MindForger outline for more details) diff --git a/man/hh.1 b/man/hh.1 index 4a38885..6a047e6 100644 --- a/man/hh.1 +++ b/man/hh.1 @@ -110,6 +110,9 @@ Configuration options: \fIfavorites\fR Show favorites as a default view (metric-based view is shown otherwise). +\fIduplicates\fR + Show duplicates in rawhistory (duplicates are discarded by default). + \fIblacklist\fR Load list of commands to skip when processing history from ~/.hh_blacklist (built-in blacklist used otherwise). diff --git a/src/hstr.c b/src/hstr.c index e9565b5..ddf57cd 100644 --- a/src/hstr.c +++ b/src/hstr.c @@ -110,7 +110,7 @@ #define HH_CONFIG_BIG_KEYS_SKIP "big-keys-skip" #define HH_CONFIG_BIG_KEYS_FLOOR "big-keys-floor" #define HH_CONFIG_BIG_KEYS_EXIT "big-keys-exit" -#define HH_CONFIG_UNIQUE_OFF "unique-off" +#define HH_CONFIG_DUPLICATES "duplicates" #define HH_DEBUG_LEVEL_NONE 0 #define HH_DEBUG_LEVEL_WARN 1 @@ -338,7 +338,7 @@ void hstr_get_env_configuration(Hstr *hstr) } } - if(strstr(hstr_config,HH_CONFIG_UNIQUE_OFF)) { + if(strstr(hstr_config,HH_CONFIG_DUPLICATES)) { hstr->unique=false; } }