xaizek / hstr (License: Apachev2) (since 2018-12-07)
Bash and Zsh shell history suggest box - easily view, navigate, search and manage your command history.
Commit 75c163b00c26d0490984dd43e3300db4721630eb

Dynamic detection of command blacklist size.
Author: Martin Dvorak
Author date (UTC): 2014-01-20 07:02
Committer name: Martin Dvorak
Committer date (UTC): 2014-01-20 07:02
Parent(s): 5b2cca30902e9baaced40aed23f69148db4c7936
Signing key:
Tree: 600036728057085fe1750184515ba4526cf2d0fa
File Lines added Lines deleted
src/hstr_history.c 3 2
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
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/hstr

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/hstr

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master