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 6c5fd44951f0d869022b9c2adf9fdc4f793ef465

Updating TODOs.
Author: Martin Dvorak
Author date (UTC): 2014-04-26 04:02
Committer name: Martin Dvorak
Committer date (UTC): 2014-04-26 04:02
Parent(s): ed5e16a82d85234660d0e83a73c78ae08e0e1410
Signing key:
Tree: 1fa67b0843fac89ede9f3f2f738637bfd11fbca2
File Lines added Lines deleted
src/hstr.c 2 3
File src/hstr.c changed (mode: 100644) (index 03e7fe5..7df98ce)
... ... char *hstr_print_selection(unsigned maxHistoryItems, char *pattern, Hstr *hstr)
511 511 char buffer[CMDLINE_LNG]; char buffer[CMDLINE_LNG];
512 512 for (i = 0; i<height; ++i) { for (i = 0; i<height; ++i) {
513 513 if(i<hstr->selectionSize) { if(i<hstr->selectionSize) {
514 // TODO make this function
514 515 if(pattern && strlen(pattern)) { if(pattern && strlen(pattern)) {
515 516 if(hstr->historyMatch==HH_MATCH_REGEXP) { if(hstr->historyMatch==HH_MATCH_REGEXP) {
516 517 start=hstr->selectionRegexpMatch[i].rm_so; start=hstr->selectionRegexpMatch[i].rm_so;
 
... ... char *hstr_print_selection(unsigned maxHistoryItems, char *pattern, Hstr *hstr)
538 539 void highlight_selection(int selectionCursorPosition, int previousSelectionCursorPosition, char *pattern, Hstr *hstr) void highlight_selection(int selectionCursorPosition, int previousSelectionCursorPosition, char *pattern, Hstr *hstr)
539 540 { {
540 541 if(previousSelectionCursorPosition!=SELECTION_CURSOR_IN_PROMPT) { if(previousSelectionCursorPosition!=SELECTION_CURSOR_IN_PROMPT) {
542 // TODO make this function
541 543 char buffer[CMDLINE_LNG]; char buffer[CMDLINE_LNG];
542 544 if(pattern && strlen(pattern) && hstr->historyMatch==HH_MATCH_REGEXP) { if(pattern && strlen(pattern) && hstr->historyMatch==HH_MATCH_REGEXP) {
543 545 int start=hstr->selectionRegexpMatch[previousSelectionCursorPosition].rm_so; int start=hstr->selectionRegexpMatch[previousSelectionCursorPosition].rm_so;
 
... ... void hstr_assemble_cmdline_pattern(int argc, char* argv[], Hstr* hstr)
855 857 } }
856 858
857 859 // TODO to be rewritten to getopt // TODO to be rewritten to getopt
858
859 // TODO on unknown option make it filter
860 // TODO on favorites - skip -f otherwise it becomes filter
861 860 void hstr_get_cmdline_options(int argc, char *argv[], Hstr *hstr) void hstr_get_cmdline_options(int argc, char *argv[], Hstr *hstr)
862 861 { {
863 862 if(argc>0) { if(argc>0) {
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