| File src/hstr_history.c changed (mode: 100644) (index c4a82ac..7ba60f1) |
| ... |
... |
typedef struct { |
| 22 |
22 |
|
|
| 23 |
23 |
static HistoryItems *prioritizedHistory; |
static HistoryItems *prioritizedHistory; |
| 24 |
24 |
static bool dirty; |
static bool dirty; |
| 25 |
|
#define BLACKLIST_SIZE 5 |
|
|
25 |
|
|
| 26 |
26 |
static const char *commandBlacklist[] = { |
static const char *commandBlacklist[] = { |
| 27 |
27 |
"ls", "pwd", "cd", "cd ..", "hh", "mc", |
"ls", "pwd", "cd", "cd ..", "hh", "mc", |
| 28 |
28 |
"ls ", "pwd ", "cd ", "cd .. ", "hh ", "mc " |
"ls ", "pwd ", "cd ", "cd .. ", "hh ", "mc " |
| |
| ... |
... |
HistoryItems *get_prioritized_history() |
| 83 |
83 |
HashSet blacklist; |
HashSet blacklist; |
| 84 |
84 |
int i; |
int i; |
| 85 |
85 |
hashset_init(&blacklist); |
hashset_init(&blacklist); |
| 86 |
|
for(i=0; i<BLACKLIST_SIZE; i++) { |
|
|
86 |
|
int length=sizeof(commandBlacklist)/sizeof(commandBlacklist[0]); |
|
87 |
|
for(i=0; i<length; i++) { |
| 87 |
88 |
hashset_add(&blacklist, commandBlacklist[i]); |
hashset_add(&blacklist, commandBlacklist[i]); |
| 88 |
89 |
} |
} |
| 89 |
90 |
|
|